Writing to the v-model for smart-select component does not effect the component
See original GitHub issue- Framework7 version: 3.3.2
- Vue.js version: 2.5.17
- Platform and Target: Android
Describe the bug
When I set the v-model
of the smart-select
component, and I change that variable to an array within my javascript, the list item does not show these items as selected. However, I know it is working because when I then open the smart-select
, I can see that those items that I put in the array for the v-model variable are checked, it’s just that they are not showing as selected inside the corresponding list-item button that opens the smart select.
To Reproduce
Steps to reproduce the behavior:
- Create
smart-select
component with a v-model, and the options ‘1’, ‘2’, ‘3’ - In your javascript, set the value of the v-model variable to [‘1’]
- The smart-select component does not show them as selected unless you open it
Expected behavior
I expect the smart-select
component to display the items within it’s v-model variable as selected, even if those items are set as selected within the javascript and not by the user.
Actual Behavior
They are being selected, but they are not being displayed in the list item for the smart-select as they would if the user had selected them manually.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
I can’t detect changed on
<select>
by Vue’s v-model. So you need to triggerchange
event on select after you change it with v-model, like$$('select').trigger('change')
or just manually write value text tof7-list-item
’safter
propertyNice job man. Thanks a million.