Unplanned
Last Updated: 28 May 2024 15:24 by Leigh

Describe the bug
The MultiSelect component throws a console error when a text value is entered in its input and the component is used as a part of the Native Form.

The issue is replicable only when a text is entered in the component's input. Everything works as expected if a value is selected from the MultiSelect's popup list.

To Reproduce

  1. Open this StackBlitz example
  2. Enter random text in the MultiSelect's input
  3. Open the browser's console and see the following error
image

Expected behavior
No errors should appear in the browser's console when using the MultiSelect component as a part of the Form component, no matter the specific configuration of the MultiSelect.

Unplanned
Last Updated: 13 Jun 2023 08:00 by ADMIN

It appears the taglist always requires a selected tag to be present in the dataItems. However this tag is not gonna be present in the dataItems when a filter is applied. It seems this causes an error, where the taglist tag expects to be able to find its corresponding dataItem in the dataItems

Repro:

  1. Open stackblitz and select 'large'
  2. filter on 'L'
  3. observe no runtime error in console
  4. remove 'L' filter and replace it with 'M'
  5. see a runtime error in the console

https://stackblitz.com/edit/z7ejuk?file=src%2Fmain.vue

I know a quick workaround for this is to ensure a selected tag is always added to the filtered dataItems, preventing the error. But are there perhaps other workarounds or is this something that can be fixed in a future release?

Thanks in advance