Tiles component - how to get current order of items #4843
-
Hi, I have a problem with the Tiles component. What is the simplest way to get the current list of items with the corresponding indexes that are visible on the UI? In the previous version (probably 3.11), I noticed that instead of passing the 'order' prop to 'tui-tiles', the 'items' list was passed directly, which causing immediately update after dragging elements on the UI. How can I achieve a similar effect? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can watch for |
Beta Was this translation helpful? Give feedback.
You can watch for
order
change. It's a map of original index to new index. We had to do that because moving items directly in DOM, rather than using CSSorder
property, caused iframes inside items to be reloaded every time they move. See examples on the docs page:https://taiga-ui.dev/components/tiles