Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #101120
    admin
    Keymaster
    Up
    0
    Down

    Hi there
    I am trying to add a new tab in a panel.
    I already have a panel with a tab and I want to add a new tab in the same panel, somebody know how to do this?
    Oh I am using React with TS by the way.
    Thanks in advance.

    #101121
    Hristofor
    Member
    Up
    0
    Down

    Hi Ivan,
    There are two ways to add a new tab item to a panel:
    1) Via the update method of the Smart.DockingLayout. You can read more about it here. You can also modify existing tab items via this method by passing it the index of the target item. For example, dockingLayout.update(dockingLayout.items[0], { items: [ { index: 1, label: 'New Tab item' }] });.
    2)Via the insert method of the panel itself. You can get a list of all panels of the Smart.DockingLayut via the items getter and then call the insert method of the panel. For example, panel.insert(1, { label: 'New Tab item' });.
    Best Regards,
    Christopher
    Smart HTML Elements Team
    https://www.htmlelements.com

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.