Our blazing fast Grid component built with pure JavaScript


Post by luizatslog »

Hi, how do I add a close button on a Tab to use in TabPanel?


Post by marcio »

Hey luizatslog,

You can add an icon to the tab like this

new TabPanel({
    appendTo : document.body,
    height   : '14em',
    items    : [
        {
            title : 'One',
          
tab : { icon : 'b-fa b-fa-times', iconAlign: 'end' }, // other configs... }, { title : 'Two', items : [ { type : 'widget', html : 'Second' } ] }, { title : 'Three', items : [ { type : 'widget', html : 'Last' } ] } ] });

You probably will need to set a listener to click and then remove the tab programmatically.

Check the available options here https://www.bryntum.com/docs/grid/api/Core/widget/Tab

Best regards,
Márcio


Post Reply