Skip to content
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

cellRenderer component and update rowData, throw error #7912

Open
MurphyHou123 opened this issue May 2, 2024 · 4 comments
Open

cellRenderer component and update rowData, throw error #7912

MurphyHou123 opened this issue May 2, 2024 · 4 comments

Comments

@MurphyHou123
Copy link

when using cellRenderer component, and update rowData (eg. by pagination), error happened:
Uncaught (in promise) Error: AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). To see what part of your code that caused the refresh check this stacktrace.
at RowRenderer.getLockOnRefresh (main.esm.mjs:35062:13)
at RowRenderer.redrawAfterModelUpdate (main.esm.mjs:35017:10)
at RowRenderer.onPageLoaded (main.esm.mjs:34897:10)
at main.esm.mjs:1017:99
at VanillaFrameworkOverrides.wrapIncoming (main.esm.mjs:40789:39)
at main.esm.mjs:1017:80
at main.esm.mjs:1021:9
at Set.forEach ()
at processEventListeners (main.esm.mjs:1013:82)
at EventService.dispatchToListeners (main.esm.mjs:1027:7)

@MurphyHou123
Copy link
Author

when i remove cellRenderer, then no issue anymore. It's easy to reproduce. So i won't provide more evidences.

@MurphyHou123
Copy link
Author

I resolve it by gridApi.value.redrawRows + gridApi.value.setGridOption. This should be resolved by one method gridApi.value.setGridOption only but not two method. maybe this can assess if any cellRenderer then deal with the issue internally.

@MurphyHou123
Copy link
Author

there is still problem when drag column or other action trigger update column. the same error caused by cellRenderer. Please confirm.

@AG-Zoheil
Copy link

Hi

Thank you for reporting this.

We'd be happy to look into this, but the most efficient way for us to do so would be for you to provide a live example reproducing the issue.

Please send us a live plunker sample which shows the issue. You can use one of the examples from our website as a starting point. Do let us know if you need further guidance on this.

We're looking forward to your response.

Kind regards,
Zoheil

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

No branches or pull requests

2 participants