Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #104440
    dilbert
    Participant

    The docs mention the dragStart, dragEnd, and reorder events for tabs are cancelable however with the following handlers I am unable to prevent tabs from being reordered.  I am able to prevent closing a tab via the closing event but not reording a tab.

    Note: omitted for simplicity from the sample below is the logic on which tabs are to be prevented from re-ordering. The intent is that only some tabs will not able to re-ordered

    HTML

    
    <smart-tabs #tabs
      (closing)="onTabClosing($event)"
      (close)="onTabClosed($event)"
      (reorder)="cancel($event)"
      (onDragStart)="cancel($event)"
      (onDragEnd)="cancel($event)"
      [reorder]="true">
    </smart-tabs>
    

    Angular component

    
    cancel(event: CustomEvent) {
      event.preventDefault();
      event.stopPropagation();
      return false;
    }
    

    Is there another preferred way of accomplishing this?

    #104443

    Hi,

    The reorder event is not cancelable, you can see that in the API here:
    https://www.htmlelements.com/angular/demos/tabs/basic/#toc-ondragstart

    Best Regards,
    Svetoslav Borislavov

    Smart UI Team
    https://www.htmlelements.com/

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