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
On reloading the content inside my one cell of grid change its size #1986
Comments
chrome_0ldblQ7h09.mp4 |
I started having this issue with a silent bump of the react-grid-layout version, for me I think it was multiple factors.
Combined what would happen is the first load would see a container too small for my items and would take it upon itself to resize the elements before emitting an onLayoutChange event which then updated my persistent state. |
@balbatross What are ur takeaways to fix this? Can u share all the factors? That would be great |
@balbatross Can u help me in figuring the problem? |
@ObaidAshiq Sorry been busy at work lately, if you can share a reproduction of the issue I can have a go at finding a fix for your use case, because the fix involves some css changes I'm not sure if there's a one size fits all fix yet. I'm not a contributor to this repo yet either so I can only help on the implementation end. |
@balbatross This is the new code I will close this issue after I see a proper explanation |
Describe the bug
I have created a card which is resizable and dragable,The above picture shows i have adjusted my card to this size, and the content is taken this shape,
But when i reload the page, the cards content has changed
This is after i reload
These cards are dynamically generated
`
My functions inside this component
`
const ResponsiveReactGridLayout = useMemo(() => WidthProvider(Responsive), []);
Some imports
import { WidthProvider, Responsive } from "react-grid-layout"; import "react-grid-layout/css/styles.css"; import "react-resizable/css/styles.css";
Your Example Website or App
N/A
Steps to Reproduce the Bug or Issue
Create a card whose content can be dynamically scaled, when resizing the card container
Store and fetch your layouts from Local Storage
Resize: SHrink the card container
Reload the page
Expected behavior
react-grid-layout library version
^1.3.4
Operating System Version
Windows
Browser
Chrome
Additional context
No response
Screenshots or Videos
No response
The text was updated successfully, but these errors were encountered: