Skip to content
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

Update grid component height after Back-End data fully loads #42

Open
Bsmoder opened this issue Jan 10, 2018 · 6 comments
Open

Update grid component height after Back-End data fully loads #42

Bsmoder opened this issue Jan 10, 2018 · 6 comments

Comments

@Bsmoder
Copy link

Bsmoder commented Jan 10, 2018

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

@BeatDeer
Copy link

BeatDeer commented Jan 12, 2018

Hello I use gutterHeight:

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

and fix this problem.

I hope it's useful. 😄 🤝

@Bsmoder
Copy link
Author

Bsmoder commented Jan 12, 2018

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

@Bsmoder
Copy link
Author

Bsmoder commented Jan 15, 2018

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

@wadackel
Copy link
Owner

Hi @Bsmoder, Thank you for Issues 🎉

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

Ref: How to manually update layout ?

@wadackel
Copy link
Owner

@BeatDeer Thank you for commenting on advice instead 👍

@seonghyeonkimm
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants