Trying to get 'name' or 'id' of tab in 'onChange' on tabbar.

Here's my code:

https://snippet.webix.com/4d3zm8la

So what I'm ultimately trying to do is run some code (an ajax call) everytime a specific tab (or the view it contains) is shown.

I'm using a 'tabview' as my main layout and inside each tab can be anything (forms / data / charts). What I need to do is, every time the 'fields' tab is clicked (and displayed) I need to trigger some code to run.

I've tried the 'onChange' and 'onViewChange' events of tabbar and multiview and they do trigger each time the view is changed. The problem is, instead of returning the tab name that I configured, it returns a garbage tab name (e.g. view154069443423), and that name is inconsistent, so I have no way of programatically knowing which tab was just clicked.

So my quesiton is, how can I get the tab 'name' or 'id' of a tabview cell?

Alternatively, is there another way to get code to run each time 'fields' is clicked on or each time it's contents is shown?

Thanks.

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!