How to reset id's of view

Hi,

https://snippet.webix.com/j531ndpz

In this snippet I am creating a new view on Add button click for which I have maintained a count variable. On removing a view I am decreasing a count. Now I want to reset the Id’s of all the view.

Thanks

Hi,

The point is that id of a view has to be static - this is the core requirement of all logic related to the interaction between views.
In case of using views count/order I would rather recommend you to get the needed widget by its position regarding the parent layout ( check the getChildViews method ), or queryView via some other parameter (perhaps, a custom one).

Hi @Listopad,

Can I reset the id on delete event of all view? In my scenario its necessary to have dynamic Id’s.

Unfortunately, there is no way to change ID of the initialized view. Available options are mentioned above.

For example, with a custom property added to the configuration (let’s call it myId ), you can change it as you need and always reach the view via

topView.queryView({ myId:"some_custom_prop1" });