cinemataztic / cine-ui

0 stars 0 forks source link

Improved error handling for Listbox when there is a mismatch between selected value and options #45

Closed MikkelWestermann closed 2 years ago

MikkelWestermann commented 2 years ago

Describe the bug When the selected value is not in the list of options, the error with the following message is thrown: "More than one label/option pair with same value.". This is a misleading error message for this case.

Furthermore, the Listbox should be able to handle a selected element when loading the options (i.e. async/loading state support).

To Reproduce

Expected behavior The Listbox should be able to wait for options in case of async loading of the options. And should give a more appropriate error message otherwise.

alkiko commented 2 years ago
  1. Start by showing a spinner while it loads the option.
  2. Warning if problem still persists after loading is done.