Created
July 9, 2020 07:08
-
-
Save dhaniksahni/f00b85864ce14476bf3408911ab1a596 to your computer and use it in GitHub Desktop.
childModule for errorCallback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<c-grand-child></c-grand-child> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { LightningElement,track } from 'lwc'; | |
import agGridcommunity from '@salesforce/resourceUrl/agGridcommunity'; | |
export default class ChildModule extends LightningElement { | |
renderedCallback(){ | |
Promise.all([ | |
loadStyle(this, agGridcommunity + "/agGridCommunity/ag-grid.css"), | |
loadStyle(this, agGridcommunity + "/agGridCommunity/ag-theme-alpine.css"), | |
loadScript(this, agGridcommunity + '/agGridCommunity/ag-grid-community.js') | |
]) | |
.then(() => { | |
console.error('isCSSLoaded'); | |
}) | |
.catch(error => { | |
this.dispatchEvent( | |
new ShowToastEvent({ | |
title: error.message, | |
message: error.message, | |
variant: 'error' | |
}) | |
); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@dhaniksahni Thanks for sharing. Were you able to load AgGrid inside LWC? It is not related to error handling. We want to use AgGrid in LWC; however, it is not supported because of locker service.