-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Dynamic static changes on children do not change children rendering #2024
Comments
In your code, try putting const DecoratedReactGridLayout = WidthProvider(ReactGridLayout) inside the component to make it re-render, which may work, but this is not a good solution. |
Thanks for the suggestion. I tried to put it inside the Home Function, but sadly it does not change any behavior of the grid. The changes don't appear until an edit mode change. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I tried to dynamically set static, draggable and resizable attributes to grid items but RGL does not react to the changes.
Also forcing an update over a reference via forceUpdate() or render() do not process the children again.
I think the responsible change detection for layouting is not aware of the attributes, because after disabling draggable and resizable for RGL and enabling it again, the component will be rendered correctly.
This happens for me with the data-grip and layout mechanism.
Your Example Website or App
https://github.com/Kogoro/bug-rgl
Steps to Reproduce the Bug or Issue
Expected behavior
As a user, I expected a rerender of at least the updated child component so that dragging and resizing will be toggled.
react-grid-layout library version
1.4.4
Operating System Version
Windows
Browser
Firefox
Additional context
Nextjs 14.1
The problem is similar to #1936 but concentrate on individual GridItems and not global on RGL level.
Screenshots or Videos
No response
The text was updated successfully, but these errors were encountered: