This is a migrated thread and some comments may be shown as answers.

k-value-primitive not working

1 Answer 560 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Elliot
Top achievements
Rank 1
Elliot asked on 16 Sep 2015, 04:45 PM

I have two multi selects:

<select kendo-multi-select ng-model="authorizedUsers.office"
             k-data-source="officeUsers"
             k-data-text-field="'fullName'"
             k-data-value-field="'userId'"
             k-filter="'contains'"
             k-placeholder="'Select users...'"
             k-value-primitive="true"></select>​

<select kendo-multi-select ng-model="authorizedUsers.client"
             k-data-source="​clientUsers"
             k-data-text-field="'fullName'"
             k-data-value-field="'userId'"
             k-filter="'contains'"
             k-placeholder="'Select users...'"
             k-value-primitive="false"></select>

both clientUsers and officeUsers are arrays of objects but when I select anything the underlying model is updated with an array of strings of userId.  Is there a bug with the multi select and k-value-primitive or am I missing something?

 

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 18 Sep 2015, 09:37 AM
Hello Elliot,

The valuePrimitive option is intended to be used with k-ng-model directive. Here is a demo that shows that:
When ng-model is used, the values will be set to the primitive values.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
MultiSelect
Asked by
Elliot
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or