angular2-grid icon indicating copy to clipboard operation
angular2-grid copied to clipboard

How to trigger grid to re-render when grid items are 'filtered out' dynamically?

Open jeffthompson1971 opened this issue 9 years ago • 2 comments

I have a grid of items and then buttons that can filter out grid items of certain types. I use a pipe to do that and the pipe updates dynamically when these buttons are clicked. and it works, when i press the button to remove certain items from the list of grid items, they indeed disappear, but I then need the grid to re-render to remove the empty spaces. if i play with the browser width or height the grid is triggered to re-draw and the remaining items are pulled together. How can i make that re-render happen programmatically without the browser window size changing. what's changing is the list of grid items. i don't want empty spaces all over my grid as I filter out items. I need the grid to re-render when it's list of items changes.

Is this possible?

jeffthompson1971 avatar Nov 07 '16 19:11 jeffthompson1971

Have you got some example code I can look at? It triggers a cascade when an item is removed so it should handle this...

BTMorton avatar Nov 20 '16 03:11 BTMorton

I have a similar problem. I created a gid in a item element. This grid has multiple items. When the window is resized it cascades in the right way, but if I resize the container (which in this part is a gridItem), I would like to trigger the cascade. There is no way to do it... Is there any way to get the underlying NgGrid element from the dom?

frankiDotNet avatar Jan 25 '17 10:01 frankiDotNet