-
Notifications
You must be signed in to change notification settings - Fork 842
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
toolbarVisibility additionalControls causes Data Grid to re-render #3880
Comments
It depends on how you are defining & passing some (many) of the datagrid's props. #3518 is relevant and may provide you with some insight, although that issue represents a lack of documentation around those props. If you can provide a minimal example representing the problem you observe (e.g. in a code sandbox, I'll look at which prop(s) are causing additional renders and provide some ways to avoid it. |
I used the example SelectionContext Provider wrapping the Data Grid <SelectionContext.Provider value={rowSelection}> |
Btw, my selectAll function is inside SelectionButton component which renders in toolbarVisibility and additionalControls |
Does using state management tools like Redux instead of Context provider guarantee Data Grid will not re-render or no? Thanks for your help. I appreciate it. |
Some can help, others wouldn't - Redux specifically, at least without additional tooling, would not. I've confirmed that the control header example causes every cell to re-render, I am looking into why and if there's another way to present the example without that performance overhead. Right now, the |
Sounds a good idea. I will try to change the context. I hope it works! Thanks man! Keep doing it! |
The alternate path I mentioned would resolve the issue, but is not the root cause. A bug was introduced into the datagrid where any new object passed to |
Is there a way the EUI grid will not render when I call functions on my additionalControls?
The text was updated successfully, but these errors were encountered: