Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
childModule for errorCallback
<template>
<c-grand-child></c-grand-child>
</template>
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'
})
);
});
}
}
@sagarpomal

This comment has been minimized.

Copy link

@sagarpomal sagarpomal commented Aug 18, 2020

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment