AlaskaAirlines / auro-menu

Custom element that provides a list of options for the user to choose from
https://auro.alaskaair.com/components/auro/menu
Apache License 2.0
2 stars 3 forks source link

selectByValue broken #149

Closed jason-capsule42 closed 2 years ago

jason-capsule42 commented 2 years ago

Describe the bug

If a value in menu is already selected, then selectByValue of a different value will not work. This is because we only allow selection of options deemed interactive and hidden options are not part of that. We should only prevent selection of "disabled" options.

To Reproduce

Steps to reproduce the behavior:

  1. Use an preset value menu
  2. Call menu.value = to a different valid menu option value
  3. See error - no selection update is made

Expected behavior

Selection should be updated to the new value passed.