Comments (2)
Hi @markywilson,
Can you clarify your desired icon tab bar behaviour?
Switch content areas (current functionality)?
Navigate between routes (like fd-tabs)?
Let me know if you have questions or prefer a different approach.
from fundamental-ngx.
Hi @khotcholava
Thanks for picking this up.
The FdTabs have the functionality of defining own template with routerLink (highlighting and selecting the tab based on routerLink
directly from the template).
<nav fd-tab-nav>
<div fd-tab-item>
<a fd-tab-link [active]="rla1.isActive" [routerLink]="'tab1'" routerLinkActive #rla1="routerLinkActive">
<span fd-tab-tag>Link 1</span>
</a>
</div>
<div fd-tab-item>
<a fd-tab-link [active]="rla2.isActive" [routerLink]="'tab2'" routerLinkActive #rla2="routerLinkActive">
<span fd-tab-tag>Link 2</span>
</a>
</div>
<div fd-tab-item>
<a fd-tab-link [active]="rla3.isActive" [routerLink]="'tab3'" routerLinkActive #rla3="routerLinkActive">
<span fd-tab-tag>Link 3</span>
</a>
</div>
</nav>
However this functionality isn't available in icon tab bar.
We mitigated that by adding extra code in the class
<fd-dynamic-page>
<fdp-icon-tab-bar #tabs (iconTabSelected)="navigate($event)">
<fdp-icon-tab-bar-tab [active]="activeTab === 'tab1'" label="Link 1" id="tab1"></fdp-icon-tab-bar-tab>
<fdp-icon-tab-bar-tab [active]="activeTab === 'tab2'" label="Link 2" id="tab2"></fdp-icon-tab-bar-tab>
<ng-container fdpIconTabBarFreeContent>
<fd-dynamic-page-content>
<router-outlet></router-outlet>
</fd-dynamic-page-content>
</ng-container>
</fdp-icon-tab-bar>
</fd-dynamic-page>
And in the class
public activeTab: string;
constructor(
private activatedRoute: ActivatedRoute,
private router: Router
) {}
public ngOnInit(): void {
this.activeTab = this.router.url.split('/').pop();
}
public navigate(item: IconTabBarItem): void {
void this.router.navigate([item.id], {relativeTo: this.activatedRoute});
}
from fundamental-ngx.
Related Issues (20)
- [Sourcing][Accessibility] Focus and visibility of the cell is not working properly in fdp-table HOT 2
- [P4] [Sourcing] [Platform] Table column filtering does not allow multiple words
- Built-in footer support for platform table components as supported in core table components HOT 3
- In Wizard Component interactive elements overlap issue over floating footer and progress bar. HOT 1
- [Platform table] FDP - Personalization Dialog (No API or function to persist the selected columns)
- Date Range localization validation using Dayjs Datetime Adapter not working correctly HOT 1
- Input placeholder text missing left margin HOT 2
- Use select API for Form generator type select
- Platform table - when using pageScrolling, fetching new data should not set busy indicator over entire table, but instead display one loading row
- pick Year/Month range in range date picker
- Incorrect padding for the "fd-card" footer
- [P3][Sourcing][Multi-input]For Multi-select fields - type in on the field select the match then click on the next header field. The cursor returns to the previous field. HOT 1
- [P4][Sourcing][Cannot move a serial approval node back to a parallel approval node]
- Layout Grid Column responsiveness lost in Flexible Column Layout
- [P3] [Sourcing] Manually editing time in Datetime Picker resets time to 12:00 AM using DayJS
- [P2][Sourcing][Localisation][PLATFORM Multi-Combobox] : Invalid entry - error message in english not translated to Hungarian language
- Cx SideNav - Keyboard navigation doesn't work if items are rendered conditionally or async
- CX SideNav - aria-hidden is set to true on all list items
- Manual Enter Date and Time Format not picked in Event Bidding Start Date Using DayJs
- CxSideNav component does not properly highlight menu items provided with ngTemplateOutlet
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fundamental-ngx.