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

Not processing dynamic submenus #134

Closed jesussilverioea closed 2 years ago

jesussilverioea commented 2 years ago

Is your feature request related to a problem? Please describe.

As we are trying to generate the menus from the results of the citySearch API, we get an error auro-menu.js:384 Uncaught TypeError: Cannot read properties of null (reading 'closest'). We believe this happens because is looking for menus that have not been generated.

Describe the solution you'd like

This error to be handle as an exception of some sort. If the menus are not generated do not load them.

Additional context

https://user-images.githubusercontent.com/108018885/180056191-0aa101fd-f092-43cf-9229-04acd7a48a64.mp4

Link to code

blackfalcon commented 2 years ago

@jesussilverioea please contact @jason-capsule42 directly, we should test this element with the data source you are using. Currently, we have been testing this element with static data so there may not be any support for a delay in the generation of the menu options.

@MattSidor you open to assisting with this as well?