question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Tabset] Nb-tabs: conditional switching

See original GitHub issue

I have an nb-tabs with multiple nb-tabs the switching is working fine but I want a next button which should be able to direct me to the next tab…I don’t know how to implement this .kindly help

Issue type

I’m submitting a … (check one with “x”)

  • bug report
  • feature request

Issue description

Current behavior:

Expected behavior:

Steps to reproduce:

Related code:

insert short code snippets here

Other information:

npm, node, OS, Browser

<!--
Node, npm: `node --version` and `npm --version`
OS: Windows (7/8/10). Linux (incl. distribution). macOS (El Capitan? Sierra?)
Browser: Chrome/Safari/Firefox/etc?
-->

Angular, Nebular

<!--
Check your `package-lock.json` or locate a `package.json` in the `node_modules` folder.
-->

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:8

github_iconTop GitHub Comments

6reactions
nnixaacommented, Mar 26, 2018

Hi @pjyoti1235, you can track the tab activation using changeTab and add there some logic to keep it in sync with your custom behavior.

1reaction
nnixaacommented, Mar 19, 2018

Hi @pjyoti1235, I believe you just need an array of your tabs, then generate the tabs based on that array and also have an active attribute within your data. So that you can change the active state and it will automatically change the active tab in your tabset: in your component:

tabs = [ { title: 'Tab1', active: false }, { title: 'Tab2', active: true } ];
<nb-tabset>
 <nb-tab *ngFor="let tab of tabs" [tabTitle]="tab.title" [ative]="tab.active">
   Tab content 1
 </nb-tab>
 </nb-tabset>

Then on click on your next button you can change which tab is active. Hope this helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Keeping Lightning:Tabset from switching conditionally
What would be the best way to handle stop the switch from taking place? Can you share a little bit of code so...
Read more >
Make tab switching conditional - reactjs - Stack Overflow
I have a basic TAB interface and was wondering if there is a way upon tab click, to check a condition ...
Read more >
Tabs Angular UI Component - Nebular - GitHub Pages
Customizable Angular UI Library based on Eva Design System with 40+ UI components, 4 visual themes, Auth and Security modules.
Read more >
Conditional Panel based on Active tab - Google Groups
I want to change the selectInputs based on the Active tab and. looking at the tabsetPanel.Rd code it looks as though this should...
Read more >
How to change tabs conditionally while using Angular Material ...
Recently while using the Angular material tabs I was faced with the challenge of changing the tabs based on a certain condition.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found