jQWidgets Forums

jQuery UI Widgets Forums Navigation Tabs Close tab, destroy contained widgets?

Tagged: 

This topic contains 3 replies, has 3 voices, and was last updated by  Peter Stoev 7 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Close tab, destroy contained widgets? #96993

    emberq
    Participant

    When I ‘x’ out of one of a tab that contains instantiated widgets on it, are all those instantiated widgets being destroyed?

    Close tab, destroy contained widgets? #97018

    admin
    Keymaster

    Hi emberq,

    No, they are not. You can bind to the jqxTabs removed event and destroy then with their destroy methods there.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com

    Close tab, destroy contained widgets? #97050

    emberq
    Participant

    OK, thanks. Is there some way to iterate through jqx controls on a tab, or any container? This is because all my tabs are different and I don’t currently know the characteristics of any one that might be ‘x’d out. It’s also difficult because the the tab index of the current tab changes as other tabs are closed or re-positioned. It would be great to just be able to iterate the tab for which that event just fired, find jqx controls and destroy them.

    Close tab, destroy contained widgets? #97097

    Peter Stoev
    Keymaster

    Hi emberq,

    We do not have API to select the widgets inside the tabs and iterate them. In general, you can probably store them in two-dimensional Array, where the first dimension is the tab index, the second is the widgets inside the tab. Then when you close a tab, use that Array to iterate through the widgets and destroy them.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.