digipolisantwerp / antwerp-ui_angular

Antwerp UI is a component interface library for building user interfaces and responsive web apps.
https://digipolisantwerp.github.io/antwerp-ui_angular
MIT License
13 stars 19 forks source link

Autocomplete ngModelChange is called before ngModel is set #209

Closed jschoubben closed 4 years ago

jschoubben commented 4 years ago

Describe the bug

During testing a package which makes use of the autocomplete I noticed the search event emitter was not called with the latest changes made to the query property of the AutoCompleteComponent.

To Reproduce

Steps to reproduce the behavior:

  1. Add the autocomplete component to your page
  2. Add an event listener for the search event
  3. Input a character in the autocomplete control (ie. "a")
  4. Your search event listener will be triggered with the incorrect value

Expected behavior

The search event listener is called with value "a" for the $event parameter.

Screenshots

N.A.

OS (please complete the following information):

Additional context

Add any other context about the problem here.