Is it possible to change layout after render?
We use your component with our settings(for i.e. block-collapsable-header-title)
Block-Collapsable-header-title. http://prntscr.com/kzc0ir When you click on block - block collapse to one-header-line
Example 2 with resizing block and return defaul-block-size.
We try to calculate positions, but it's to difficult https://gyazo.com/6ee398737a6a2205f1365c967cc1734a?token=e3f0361e5d8c3b5358b25cee2e98a73c
Is it possible to change layout after render?
Based on the code I would say that it is supposed to work, but I am also having issues with this.
I have my layout in a layout in a state variable and I try and remove one of the items from the layout. Even though I can see that the item is no longer in the layout using the React tools, and i am no longer drawing the item, there is still a hole in the layout that has "substance" because RGL believes something should be there in that spot.
The code uses lodash.isEqual on the ComponentWillReceiveProps call to decide if the layout has been changed. I'm even using a new array when I update the state, but it still ignores the change.
The only way I've been able to make a change take effect is to send an empty array: this.setState({layout: []}) and then this.setState({layout}) to set it to the modified layout. Doing this causes the RGL to blank but at least it will take the layout changes.
Is this control being actively maintained? It looks like its been months since any commits and there are pull requests that have been out there forever...
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 7 days
It's not stale, just being ignored
@fairps late response, but maybe some might still have this issue, the solution for the flash not to happen, add a elem to the layout which you hide with css, and right after set the correct layout without it. This makes the grid to update without flashing....
Great idea! Nope not too late… in fact very timely as I am just beginning to pick that project back up. Thanks! J
From: Ricardo Gomes [mailto:[email protected]]
Sent: Wednesday, October 14, 2020 5:00 AM
To: STRML/react-grid-layout
Cc: fairps; Mention
Subject: Re: [STRML/react-grid-layout] Is it possible to change layout after render? (#860)
@fairps https://github.com/fairps late response, but maybe some might still have this issue, the solution for the flash not to happen, add a elem to the layout which you hide with css, and right after set the correct layout without it. This makes the grid to update without flashing....
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/STRML/react-grid-layout/issues/860#issuecomment-708297603 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AGUKWWB62PLL3VQIL7KIR6DSKVZCVANCNFSM4FXRUGFA . https://github.com/notifications/beacon/AGUKWWGVVG53JDQAXBQ4PVLSKVZCVA5CNFSM4FXRUGFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFI34HAY.gif
@fairps do you have the code you used to do this?
I am not quite sure how to accomplish what @hellhoundsx is talking about
Most helpful comment
The only way I've been able to make a change take effect is to send an empty array: this.setState({layout: []}) and then this.setState({layout}) to set it to the modified layout. Doing this causes the RGL to blank but at least it will take the layout changes.
Is this control being actively maintained? It looks like its been months since any commits and there are pull requests that have been out there forever...