ng2-semantic-ui icon indicating copy to clipboard operation
ng2-semantic-ui copied to clipboard

feat(tabs): Ability to select tabs programmatically

Open trevordaniels opened this issue 7 years ago • 2 comments

I'd like to request the ability to select tabs in code. This would be useful in syncing active tabs with a current route paramater eg. with the following setup, a url of 'mail/sent' could activate the second tab.

routes = [{ path = "mail/:folder"...
<sui-tabset>
  <div class="ui top attached tabular menu">
    <a class="item" suiTabHeader="1">Inbox</a>
    <a class="item" suiTabHeader="2">Sent</a>
    <a class="item" suiTabHeader="3">Archived</a>
  </div>...

trevordaniels avatar Sep 13 '17 09:09 trevordaniels

+1 (this would be very useful) btw. what is best workaround now to get f.ex.second tab active on init (tried 'ngOnInit' and 'ngAfterViewInit' but didn't get success?? Maybe newbie problem but can anyone get some glue...

netmiller avatar Nov 22 '17 19:11 netmiller

@netmiller workaround will be to have a bool somewhere in the component to command the tabset; check the examples

genuinefafa avatar Jun 19 '18 21:06 genuinefafa