ag-grid-enterprise icon indicating copy to clipboard operation
ag-grid-enterprise copied to clipboard

Uncaught Action failed: c:AG_GridExample$controller$init [Cannot read property 'classList' of undefined] Salesforce Lightning Component

Open sunilajmer opened this issue 5 years ago • 6 comments

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]

sunilajmer avatar Jul 26 '19 12:07 sunilajmer

I am using the latest version of ag-grid in my salesforce developer org in lightning component. And getting this above title error.

sunilajmer avatar Jul 26 '19 12:07 sunilajmer

Did you find a solution to this?

sahil-goel avatar Aug 14 '19 09:08 sahil-goel

Am looking for a solution as well

koljaho avatar Nov 04 '19 06:11 koljaho

does anyone have solution for this one?

ghost avatar Jan 15 '20 08:01 ghost

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 avatar Apr 24 '20 07:04 mbs-zanas-stundys

@mbs-zanas-stundys @sunil114sharma are you guys using it on LWC or Aura Component?

sagarpomal avatar May 06 '20 20:05 sagarpomal