yuche / vue-strap

Bootstrap components built with Vue.js
http://yuche.github.io/vue-strap/
MIT License
4.71k stars 929 forks source link

v-select component works incorrect with integer values #277

Open SCIF opened 8 years ago

SCIF commented 8 years ago
            <v-select :value.sync="groups" :options="groupOptions" multiple></v-select>

And data is:

      'groupOptions': [
        {value: 5, label:'Apple'},
        {value: 6, label:'Banana'},
        {value:'cherry', label:'Cherry'},
        {value:'orange', label:'Orange'},
        {value:'grape', label:'Grape'}
      ],
      'groups': [5, 'grape'],

Grape shown in placeholder while apple not. If i will choose only integer values — placeholder will be truncated to small as there isn't characters at all. vue-select-bug

cieplik206 commented 8 years ago

I have same problem, did you fixed it ?, Is there a way where PHP/Laravel can cast JSON from integer to string ?

SCIF commented 8 years ago

@cieplik206 , it's not backend fault therefore workaround should be implemented on frontend side. You can use computed values to cast to string values.

wffranco commented 8 years ago

Is not about the type of element (number or string)... is more like if the multi select was truncated. I tried to detect the problem but can't detect it. I'll check all this behavior and rewrite it if is necessary. Greeting.