TNG / ngqp

Declaratively synchronize form controls with the URL
https://tng.github.io/ngqp
MIT License
81 stars 8 forks source link

emptyOn + multi leads to incorrect behavior #144

Closed Airblader closed 5 years ago

Airblader commented 5 years ago

Which versions are you using?

Angular: 8+
@ngqp: 1.0.0

What does the bug look like? Using a custom component with multi and emptyOn leads to improper behavior. For the Stackblitz below:

  1. Select "male"
  2. Select "female"
  3. Deselect "male"
  4. Deselect "female"

Expected: nothing is selected, actual: Male gets selected.

How can this bug be reproduced? https://stackblitz.com/edit/angular-favixa

Airblader commented 5 years ago

This turned out to be an issue with the custom ControlValueAccessor used in the example.