Tabbar onViewChange Event OR View.onShow Event?

How can I capture this event using the Tabbar?

OR

How can I capture the onShow/onFocus event for a view when it becomes visible? I tried to add “onFocus” to the view and it is not triggering.

All Tabbar events are described here:

http://docs.webix.com/api__refs__ui.tabbar.html

The onShow event occurs for windows. As for the onViewChange, you can attach this event only to the views that correspond to the tabbar. Perhaps you need the onChange event. Check the snippet:

http://webix.com/snippet/5bb5b33b

Let’s have a look at the event order during multiview switching to make everything clear:

  • tabbar:onbeforetabclick [option_id, e]
  • tabbar:onchange [newvalue, oldvalue]
  • view that is shown at the moment:onviewshow
  • multiview:onviewchange [oldview, newview]
  • tabbar:onaftertabclick [option_id, event]

You can choose any event you like according to your needs. For me, onViewChange is preferable as I can get IDs of both views: the previous and the current one.

You can monitor view events in the console by enabling event logging in the debug version of Webix.

Thanks this helps a lot.

I need the onViewShow event for my Tabbar like Code Snippet but this don’t work. Thanks for your help

Hi, the onViewShow event applies to the views that were hidden and are shown at the moment. It can be multiview cells or any view that was hidden and is shown now.
In your example, it will work with the cells of the multiview when they are shown. And, it will work with a tabbar if to hide/show it

Check the snippet: Code Snippet

thanks - that helps a lot