ag-grid-enterprise
ag-grid-enterprise copied to clipboard
Uncaught Action failed: c:AG_GridExample$controller$init [Cannot read property 'classList' of undefined] Salesforce Lightning Component
I'm submitting a ... (check one with "x")
[ ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/ceolter/ag-grid-enterprise/blob/master/CONTRIBUTING.md#question
Current behavior
Expected behavior
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
- ag-Grid-Enterprise version: 2.0.X
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
- Language: [all | TypeScript X.X | ES6/7 | ES5]
I am using the latest version of ag-grid in my salesforce developer org in lightning component. And getting this above title error.
Did you find a solution to this?
Am looking for a solution as well
does anyone have solution for this one?
I did encounter this issue when I was calling API methods during an editable
callback;
const columns = [
{
editable: (params) => {
if (params.node.data.someField) {
params.node.setDataValue("someField", "");
}
return false;
},
},
];
I managed to fix the issue by adding a setTimeout
const columns = [
{
editable: (params) => {
if (params.node.data.someField) {
setTimeout(() => {
/**
* `setTimeout` is important here, since calling
* API methods during an `editable` callback
* seems to break ag-Grid functionality
*/
params.node.setDataValue("someField", "");
});
}
return false;
},
},
];
This is definitely not an elegant solution though, something cleaner is preferable.
@mbs-zanas-stundys @sunil114sharma are you guys using it on LWC or Aura Component?