NgbTypeahead: No event emitted on ESC or onBlur?
See original GitHub issueHi guys,
I glanced at the typeahead.ts
source code and it seems there is no event emitted when user press Esc key (or clicked outside of the component).
I need this event emitted so that I know that the user cancelled the operation. Then I can display a default text instead / propagate the event to parent component.
Should I go ahead and hack on the source code and add the event? or is this feature already available and I am not seeing it?
The reason I am asking this is because my angular/typescript/javascript skill is minimal… I am sure I will do more harm than good if I ever attempted to ‘contribute’.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Angular Ngbtypeahead Doesn't Reset Value Of ... - ADocLib
An event emitted when the close button is clicked. It has no payload and only relevant for dismissible alerts. 8.0.0. property dismissible. Disable...
Read more >Angular ngbTypeahead doesn't reset value of input on blur
I'm using the bootstrap ngbTypeahead of Angular2+ and I want to clean the input when lose focus and no item ware selected.
Read more >ng-bootstrap/ng-bootstrap/ng-bootstrap.metadata.json - UNPKG
... btn-link ngb-dp-arrow-btn\" (click)=\"navigate.emit(navigation. ... title=\"Select month\"\n (change)=\"changeMonth($event.target.value)\">\n <option ...
Read more >@ng-bootstrap/ng-bootstrap | Yarn - Package Manager
The closed event is emitted after the 'fade out' animation is finished. ... typeahead: resubscribe for value changes on blur, esc, enter (47797d3), ......
Read more >@ng-bootstrap/ng-bootstrap@14.0.0 - jsDocs.io
An event emitted when the collapsing animation is finished on the panel, ... Has no effect if the panel is already collapsed or...
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
There are no specific events emmited today when typeahead is dismissed. This could be a feature request to explore (but before implementing anything we should check if this is really needed as users could simply listen to the esc events on their side).
Marking as a feature request.
+1 This would be great. I have a scenario where a user is editing an existing record, and want to restore the value of the typeahead input to the previous value when they abort selection of a new value