ngx-bootstrap: Resetting components tabs no longer removes tab from UI - 1.1.16-11
Look like fix to https://github.com/valor-software/ng2-bootstrap/issues/696 (thanks BTW) may have broken something. Changing a components tabs no longer causes the old tabs to go away.
HTML
<tabset>
<tab *ngFor="let tabz of tabs"
....
Component
private tabs: any[];
…
in ngOnInit
this.tabs = [...]
at some point in the future
this.tabs = [...]
Original tabs from onInit should go away and be replaced with new tabs. Instead original tabs are still on screen along with new ones.
(Actual use case is my workaround described in https://github.com/valor-software/ng2-bootstrap/issues/699 where I veto tab selection by replacing the current tab state with the previous tab state. This seems to be a bug in any case but perhaps its time for me to revisit that, maybe something has changed since then)
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (5 by maintainers)
What’s the current state on this? I am also facing this issue right now! Is there a workaround that I can put in place?
edit: I fixed this by accident. Since my data loads async I remove the tabset (using *ngIf) during loading, to show a progress bar. after loading finishs the tabset gets build newly and all the old tabs are gone!
So just use a boolean on ngIf that you toggle when you are changing your data!