react-stack-grid icon indicating copy to clipboard operation
react-stack-grid copied to clipboard

Update grid component height after Back-End data fully loads

Open Bsmoder opened this issue 8 years ago • 6 comments

I hope the subject line explains it,

Basically we load some data from the back-end that increases the height of a component. As a result, components right below render on top of the first component.

We have a way to change it by maybe updating the logic, however, I thought it would be a good idea to ask here as well. Maybe you have a function or something simpler to update the layout after back-end data is fully rendered.

Thank you!

Initially, the component is empty. I think the Grid renders its height according to the empty component screen shot 2018-01-10 at 6 11 16 pm 2

The data loads pushing the component down, screen shot 2018-01-10 at 6 08 12 pm

After I resize the browser, Grid rerenders and everything is placed in the right position. screen shot 2018-01-10 at 6 08 30 pm

Bsmoder avatar Jan 10 '18 23:01 Bsmoder

Hello I use gutterHeight:

<StackGrid columnWidth={520} gutterHeight={70} duration={0} > {catalogs} </StackGrid>

and fix this problem.

I hope it's useful. 😄 🤝

BeatDeer avatar Jan 12 '18 19:01 BeatDeer

How can I preserve gutterHeight for other panels that do not change its height?

Bsmoder avatar Jan 12 '18 21:01 Bsmoder

Didn't fix, but hacked... adjusted media css min-height...

Bsmoder avatar Jan 15 '18 17:01 Bsmoder

Hi @Bsmoder, Thank you for Issues :tada:

At the time the backend data is loaded, it may be solved by using the updateLayout() method.

Ref: How to manually update layout ?

wadackel avatar Jan 20 '18 14:01 wadackel

@BeatDeer Thank you for commenting on advice instead :+1:

wadackel avatar Jan 20 '18 14:01 wadackel

@tsuyoshiwada without updateLayout() func calls, there is no way to update Layout?

I add transform css to each image while scrolling, it scales up from the little bottom. After scaling up, I call updateLayout() but no changes happens.

Could you help me to figure this out? Thanks.

seonghyeonkimm avatar Feb 07 '18 08:02 seonghyeonkimm