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

Relayout doesn't work if when some of the items are set to display:none #35

Closed
thdk opened this issue Sep 18, 2018 · 2 comments
Closed

Comments

@thdk
Copy link

thdk commented Sep 18, 2018

I implemented a filter which simply hides some of the items in the grid using css (display:none)

A css class gets toggled on a container element (ex. body) when this css class is set, some of the items in the grid are set to display:none;

This requires a relayout of the grid. But both the jquery and the javascript version do not relayout the grid. When I remove the items from the dom, then the relayout works.

@thdk
Copy link
Author

thdk commented Sep 18, 2018

I suggest to skip invisible items using offsetWidth > 0 and offsetHeight > 0

@thdk
Copy link
Author

thdk commented Sep 21, 2018

I fixed it without change to the library.

I just had to use a different itemSelector every time my filter changes and redraw the grid using this itemSelector every time the filter changes.

@thdk thdk closed this as completed Sep 21, 2018
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

1 participant