TABS fired select event if I allocated value in input.
"ngx-bootstrap": "^2.0.2",
Please provide a reproduction of this issue.
You can use one of the starter templates:
Plunkr: https://plnkr.co/edit/0NipkZrnckZZROAcnjzB?p=preview
StackBlitz: https://stackblitz.com/edit/ngx-bootstrap?file=app%2Fapp.module.ts
@IlyaSurmay Reprod:
https://plnkr.co/edit/uL5wXt3W1nKsBYusR2Z4?p=preview
Just select the text in the input-field. This will trigger the (select) output of the tab, as can be seen by the console print
When going to be fix this bug?
Any update on this bug?
According to this issue on Angular's repo, this is expected behavior of angular. (event) listeners will listen for @Output() events and DOM events. Components should avoid using DOM event names. (select) should probably be renamed to something like (tabSelect)
I also believe that if they change the event name to something else, that this would fix this issue. Until then, put this in the event(s) that the (select) triggers.
(select)="doThisOnSelect($event)
doThisOnSelect(ev?: any)
{
if (!(ev instanceof TabDirective)) return;
...
}
Had same issue in version ^3.0.0, @clabough recommendation fixed it for me.
Same issue here! Isn't there any different event for that?
FYI, if someone else stumbles upon it: Together with this Firefox bug (nsLayoutUtils::GetNearestScrollableFrame) the browser tab may crash if child elements of the tab are removed in the (select) callback.
thank you @clabough - your fix worked for me as well
Awesome, @clabough solution worked. Thanks!
@clabough solution worked for me as well Thank you !!!! 馃憤 馃憤
Most helpful comment
I also believe that if they change the event name to something else, that this would fix this issue. Until then, put this in the event(s) that the (select) triggers.