Damjan Dimitrioski
Damjan Dimitrioski

Reputation: 727

Ext-js4 MVC tabspanel onclose event

I need to implement global onclose event on a tab panel component, so whenever a tab is being closed, I want something to happen.

Can this be accomplished ?

Upvotes: 0

Views: 219

Answers (1)

dbrin
dbrin

Reputation: 15673

Using MVC controllers it very easy to listen to such events. Here is a sample code that goes into an instance of an Ext.app.Controller class :

init:function () {
    this.control(
       'tabpanel tab':{
            close:this.onTabClose
        } 
        .....
}

Here is an example http://jsfiddle.net/dbrin/UqfFH/

Upvotes: 1

Related Questions