Tabset (change) event gets fired in non-related situations.
See original GitHub issueBug description:
Basically what happens is that if an is inside a tab, any method associated with the tabset’s (change) event will get fired if the input’s value changes (and the input loses focus).
So the event gets triggered if either a selected tab changes or if an input field’s value changes inside the tab changes.
My personal case is the following. On a (change) event I run code that changes the route to include the open tab in the parameters. One of the tabs has a form. By changing a form input value in that form, the route change function runs and another tab opens.
To make it work I’m using this hack:
onTabSelect(data: NgbTabChangeEvent) {
if (data.hasOwnProperty('nextId')) {
this._router.navigate(...);
}
}
Angular: 2.0.0
ng-bootstrap: 1.0.0.alpha-4
Bootstrap: 4.0.0.alpha-4
EDIT: I now realize I probably should have replied here instead: #594
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
how to catch input change event when moving to another tab
Hello Lina, The change event for an input element is fired after the element loses focus. For dropdown controls it is fired automatically...
Read more >Is there Selected Tab Changed Event in the standard WPF ...
I have tried using TabControl.SelectionChanged but it is getting fired many times when a child's selection within a tab is changed. wpf ·...
Read more >Lightning Tabset tab change callback (LWC)
The Tab Component have an active Event which is fired everytime their content gets activated.
Read more >Publication 598 (03/2021), Tax on Unrelated Business Income ...
A volunteer fire company conducts weekly public dances. Holding public dances and charging admission on a regular basis may, given the facts and ......
Read more >Indexed Database API 3.0 - W3C
An event with type versionchange will be fired at an open connection ... The set of object stores can be changed, but only...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jnizet ref: https://github.com/angular/angular/issues/11666
I expect it to be debated 😃 And I think that it actually makes sense to have a specific event name so it stands out in a template, hence the PR.
At least for events that bubble, yes.
Yes. I was just waiting for the reaction to my 1st PR 😃