telerik / kendo-angular

Issue tracker - Kendo UI for Angular
http://www.telerik.com/kendo-angular-ui/
Other
466 stars 215 forks source link

[MultiSelect] Setting the valueField to a nested property value throws an error when valuePrimitive is true #4362

Closed zstoyanova9 closed 3 weeks ago

zstoyanova9 commented 1 month ago

Describe the bug When the valueField of the MultiSelect is set to point to a nested property value and the valuePrimitive property is true, then the user selects an item, the emitted value from the component is the whole object, not the specified valueField. This causes an "Expected values of primitive type" error to be thrown in the console:

image

To Reproduce

  1. Open the following StackBlitz example - https://stackblitz.com/edit/angular-fv9bym
  2. Select a value for the MultiSelect.
  3. Observe the error in the console.

chrome_evuz51evZt

Expected behavior The emitted value from the MultiSelect should be of a primitive type (as specified in the valueField) and no error should be thrown.

Additional context When a value is set programmatically for the MultiSelect and is of the correct primitive type, the unexpected behavior is not observed. Example - https://stackblitz.com/edit/angular-fv9bym-4dbeyz

tswetti commented 3 weeks ago

Fixed in v16.7.1