Coder Social home page Coder Social logo

Comments (6)

ObaidAshiq avatar ObaidAshiq commented on June 12, 2024
chrome_0ldblQ7h09.mp4

from react-grid-layout.

balbatross avatar balbatross commented on June 12, 2024

I started having this issue with a silent bump of the react-grid-layout version, for me I think it was multiple factors.

  1. Having a minimum width for your container can help stop the first load from trying to make your items smaller
  2. The documentation doesn't clearly explain that onLayoutChange is called on mount and on change to the layout prop

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.

from react-grid-layout.

ObaidAshiq avatar ObaidAshiq commented on June 12, 2024

@balbatross What are ur takeaways to fix this?

Can u share all the factors?
With fixes if possible

That would be great

from react-grid-layout.

ObaidAshiq avatar ObaidAshiq commented on June 12, 2024

@balbatross Can u help me in figuring the problem?

from react-grid-layout.

balbatross avatar balbatross commented on June 12, 2024

@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.

from react-grid-layout.

ObaidAshiq avatar ObaidAshiq commented on June 12, 2024

@balbatross
Sorry, for disturbing
I got it fixed, as u said it might have been a slight bump(for me it wasn't)
I tried to go from 1.3.4 top above versions, but these versions are bugged as the resize handle isn't working this time
The issue seemed to be with w-auto in one of the div, i changed it to w-full (using tailwind CSS)
I am not sure what the problem is with using w-auto

This is the new code
<Doughnut
options={options}
data={chartInfo}
// className='w-auto max-h-full ' - OLD ONE
className=" w-full max-h-full " >

I will close this issue after I see a proper explanation

from react-grid-layout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.