MultiSelect inside Form throws error when entering text

1 Answer 22 Views
MultiSelect
Vincent
Top achievements
Rank 2
Iron
Iron
Iron
Vincent asked on 14 Sep 2021, 07:25 AM | edited on 14 Sep 2021, 08:14 AM

I've added the Kendo MultiSelect component inside a Kendo Form. However once I start typing some text inside the MultiSelect it throws an error as soon as I click outside:
https://stackblitz.com/edit/bfuhyb?file=src%2FFormInput.vue (stackblitz example of the problem)

What's worse is that upon throwing this error it completely freezes the input until you remove the text (you can't see this on stackblitz since the error covers the screen).

Did I forget to add a certain property to the MultiSelect or is this a bug?

When the MultiSelect is outside of a Kendo Form it doesn't have this behavior:
https://stackblitz.com/edit/ys4zsu?file=src/main.vue (stackblitz as linked on https://www.telerik.com/kendo-vue-ui/components/dropdowns/multiselect/)

1 Answer, 1 is accepted

Sort by
1
Accepted
Plamen
Telerik team
answered on 14 Sep 2021, 11:24 AM

Hello,

Thank you for reaching out. It seems like a bug in our multiselect component when we use the change event. I have logged it here from your behalf - https://feedback.telerik.com/kendo-vue-ui/1535305-multiselect-search-string-is-passed-to-the-change-event-when-typing-in-the-input

 Please excuse us for this bug - we will do our best to fix it as soon as possible yet you can use a temporary workaround and only send the change if it is an array:

  handleChange(e){
             if (Array.isArray(e.target.value)) {
                   this.$emit('change', e);
             }
        },

Here is an updated stackblitz - that worked correctly at my side - https://stackblitz.com/edit/bfuhyb-htqlg3?file=src%2FFormInput.vue.

I have also changed the value type to Array because this is what is expected by the Multiselect component.

If you observe other issues please let us know.

Regards,
Plamen
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
MultiSelect
Asked by
Vincent
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Plamen
Telerik team
Share this question
or