angular2-grid
angular2-grid copied to clipboard
How to trigger grid to re-render when grid items are 'filtered out' dynamically?
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?
Have you got some example code I can look at? It triggers a cascade when an item is removed so it should handle this...
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?