question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: programmatically set `size` results in different `flexGrow`

See original GitHub issue

Hi,

I programmatically set the size for a panel and have a button to toggle minimizing it. What I see is the size of the panel changes when I toggle the panel. See the videos below:

In this video, you can see Iconsole.log out the size and it stays the same at 300

https://user-images.githubusercontent.com/13574879/129611937-a6a414a8-50c2-4e22-b232-87ccc13dc13d.mov

In this video, I repeat the same experiment, but observe the flex in style, it changes

https://user-images.githubusercontent.com/13574879/129611880-3230e459-dd27-4003-af43-b2c64df03700.mov

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
akphicommented, Oct 16, 2022

@mastercoms thanks! I have tested it out and it does fix my problem

2reactions
mastercomscommented, Oct 15, 2022

I found this is a problem with ReflexContainer adjustFlex, for some reason the flex adjustment is different every time

Workaround: I set flex=1 for the visible component and flex=0 for the initially invisible sidebar.

Read more comments on GitHub >

github_iconTop Results From Across the Web

flex-grow - CSS: Cascading Style Sheets - MDN Web Docs
The flex-grow CSS property sets the flex grow factor of a flex item's main size.
Read more >
Force flex item to span full row width - Stack Overflow
When you want a flex item to occupy an entire row, set it to width: 100% or flex-basis: 100% , and enable wrap...
Read more >
How to Build CSS-only Smart Layouts with Flexbox - Toptal
Flexible box, or Flexbox in short, is a set of properties in CSS introduced in ... But if one a flex-grow value of...
Read more >
`flex-grow` is weird. Or is it? | CSS-Tricks
By knowing how many flex-grow values we have in total, ... flex-grow value and the result is added to each child elements initial...
Read more >
Column Sizing - JavaScript Data Grid
Sets columns to adjust in size to fit the grid horizontally. ... This insures the result is deterministic and not depend on any...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found