Skip to content

The change event is triggered twice when using the remove Item button #892

@djave-co

Description

@djave-co

Describe the bug
If you click the removeItem button (clearing the input) an event is triggered with the current value, then another event is triggered with the new (empty) value.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://codepen.io/EightArmsHQ/pen/45e90d693e81947159b4cac7caf12abd
  2. Click on the first option in the dropdown
  3. Click the cross
  4. Notice that there have now been 3 events in the console.

Expected behavior
The removeItem button should just fire the change event with the new, empty value.

Desktop (please complete the following information):

  • OS: iOS
  • Browser Chrome

Additional context
This bug can be frustrating if you use the change event to trigger a promise, to do something asynchronous, as the results sometimes come back in the wrong order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions