I realise that closable tabs has been raised several times but am wondering if there is indeed a preferred / recommended way of implementing them in UI 1.9.2
I am rendering my tabs as per below:
Clearly it's easy enough to add the appropriate "closable" image to tabs that have been added dynamically in code but what then? Essentially I want to detect the click on the "close" image, raise an event which then triggers a handler to destroy the content of the tab that's closing.
I was told that closable tabs was included in ui 1.9.2 but I guess I'm missing something as all I can find is collapsible tabs.
Sorry if this topic has been done to death but I'm not seeing a confirmed approach to the issue although I admit to being very new to all of this.
Since you are adding them dynamically you need to use the on function to attach the click handler. Also, since appear to be loading external content, you 'll need to change how you locate the corresponding tab. Like this perhaps: