-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this.cellComp is undefined in CellCtrl.createCellRendererParams with AgGridReact #5085
Comments
Having the same issue after upgrading to AG Grid v27. No specific pattern on my end as well, seems sporadic. Here is a stack trace:
|
I've now managed to come up with a reasonably simple example that reliably reproduces the error. I've modified the I think the conditions needed to trigger this are creating new rows and then mutating their data soon after they are created. I've modified the example so that the Refresh button will add new rows to the existing data and then modify the row data for the skills cells so that they need to be redrawn. Making many state changes in succession seems to be needed to reliably reproduce the error although that doesn't really match what my real code is doing. |
I've also experienced this issue after upgrading to ag-grid v27. I could work around the issue by avoiding calling |
Could you please confirm if this is still an issue with version 27.2 that was released today. |
Looks like it's impossible to install ag-grid-react with other ag-grid packages on 27.2.0 because of this: #5104 |
Hi @StephenCooper, I can confirm this appears to be fixed in 27.2 and I can no longer reproduce the crash with my example. Looks like this was fixed by 516e500. (When installing with yarn I get a warning |
Thanks for validating the fix. We will be releasing a patch for the peer dependency issue later today, thanks for the quick feedback on that one. |
27.2.1 has now been released which fixes the peer dependency issue. |
Hi everyone Flow: Uncaught TypeError: Cannot read properties of undefined (reading 'getParentOfValue')
|
Hi everyone, I am facing similar issue in "ag-grid-react": "27.3.0". Unable to reproduce locally but in deployed application it is crashing consistently. The error While debugging I found that this.cellComp is undefined in CellCtrl.prototype.setInlineEditingClass and this line causes the error this.cellComp.addOrRemoveCssClass(CSS_CELL_INLINE_EDITING, editingInline); . |
For what it's worth: we frequently see this issue in our production code (between 5 - 10 times in the last year in different places) and it seems like it's associated with rapidly updating filters / page sizes / sorts on a grid. We're currently locked into using |
I'm submitting a ... (check one with "x")
I've been working on upgrading the version of ag-grid used by the open source mlflow project from 25.3.0 to 27.1.0, and trying to improve performance when reloading data or loading more data by implementing the
getRowId
method.However, I'm getting errors when updating the row data within ag-grid in
CellCtrl.createCellRendererParams
becausethis.cellComp
is undefined. The full stack trace is:I've tried to reproduce this with a minimal example but without any luck. And the error isn't consistently reproducible but will happen randomly, so possibly there's a race condition somewhere. The full code I'm using can be seen at https://github.com/adamreeve/mlflow/blob/d9adb6a9c7574c97b194dc193ebb8bc1a2f2fb4b/mlflow/server/js/src/experiment-tracking/components/ExperimentRunsTableMultiColumnView2.js
Does this look like I'm doing something wrong or is this a bug within ag-grid?
I can see comments elsewhere in
CellCtrl
stating that cellComp may not be set yet due to async in React (ag-grid/community-modules/core/src/ts/rendering/cell/cellCtrl.ts
Lines 648 to 649 in 6647b6a
CellCtrl.refreshCell
ifthis.cellComp
is not set. (Exiting early increateCellRendererParams
orshowValue
isn't enough as then the same error is raised inapplyUserStyles
). This isn't an area I'm very familiar with but I'm happy to open a PR with that change if you'd like.Current behavior
Cannot read properties of undefined
error when updating row data.Expected behavior Not crashing.
Please tell us about your environment:
Fedora Linux 35, using a React app based on craco.
AG Grid version: 27.1.0
Browser: Chrome 100 (
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.88 Safari/537.36
)Language: ES5
The text was updated successfully, but these errors were encountered: