k-value-primitive not working

2 posts, 0 answers
  1. Elliot
    Elliot avatar
    59 posts
    Member since:
    May 2012

    Posted 16 Sep 2015 Link to this post

    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?

     

  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 18 Sep 2015 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
Back to Top