AlaskaAirlines / auro-combobox

An auroLabs custom element w/an experimental API. You've been warned.
https://auro.alaskaair.com/components/auroLabs
Apache License 2.0
4 stars 1 forks source link

auroCombobox-valueSet event is unnecessarily being fired twice #122

Open jordanjones243 opened 1 year ago

jordanjones243 commented 1 year ago

General Support Request

Support request

The auroCombobox-valueSet is being fired twice when the value is being changed, when it only needs to be called once within the handleInputValueChange method.

Possible Solution

Remove the dispatch of this event within the auroMenu-selectedOption event listener.

Context

Within the auroMenu-selectedOption event listener, we change the value of this.input.value. Whenever this.input.value is changed, we make a call to dispatch auroCombobox-valueSet, whether or not a menu option was selected. So once a menu option is selected, we are making a call to handleInputValueChange, which dispatches the event, then we unnecessarily dispatch the event a second time within this function.

Patrick-Daly-AA commented 1 year ago

Double check to see if this is an issue after the Auro-Input refactor.