Topic: Autocomplete input clear not triggering callback
Uriel Cota free asked 5 years ago
ng-uikit-pro-standard-7.4.4
I am using the mdb-auto-completer as shown in this documentation. https://mdbootstrap.com/docs/angular/forms/autocomplete/
Expected behavior: In the component when I subscribe to the selectedItemChanged observable I expect the callback to run when I select and item from the list and when I click the 'x' (clear) button.
Issue: Only the callback is called when I select an item from the list, but it is not triggered when I click the 'x' (clear) icon.
ngAfterViewInit() {
this.completer.selectedItemChanged().subscribe((data: any) => {
// I am here when I select from the dropdown
// But not when I click the 'x' button
});
}
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: 7.4.4
- Device: PC
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: Yes