Results 1 to 2 of 2

Thread: set accordion class when active tab panel

  1. #1

    Default set accordion class when active tab panel

    Hi, I use accordion menu, when I click it open the grid inside a tabpanel.

    How I can set a custom css class to the menu to the activated tab, and change it when I change the to other tab.

    my actual code is

    region: 'center',
    xtype: 'tabpanel',
    reference: 'tabPanelCenter',
    listeners: {
    tabchange: 'changeTab'
    },


    and

    changeTab: function(tabPanel, newCard) {
    //Here I want to change the submenu css class
    }

    Best regards

  2. #2
    Sencha User
    Join Date
    Oct 2018
    Location
    Noida
    Posts
    56
    Answers
    10

    Default

    Hi,
    You can add custom class to the click menu item like given in below fiddle -
    https://fiddle.sencha.com/#view/editor&fiddle/2vo3

    If you want to remove the class on tab-change, rather than another menu item click, then on tab-change event you just need to get the menu and loop through its items and remove class like give in the above fiddle.

    Hope that helps !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •