B
B
Barberry2021-11-17 19:39:51
Vue.js
Barberry, 2021-11-17 19:39:51

V-range-slider - why doesn't the view change when the model changes?

v-range-slider - does not change the view when the model changes, on the @change event in v-select I call a method that changes the object, but the view does not change - why so?
Sandbox .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2021-11-17
@vishneviy_sad_c

Someone inattentively read the documentation . Instead of assigning values ​​to individual elements, overwrite the entire array:

filterRS.filter_range_value = [ selected_start, selected_end ];

All in all, it looks a bit dark. Maybe it's better to let the selected values ​​always be numbers? - this will allow you to use v-modelone array for both selects and ranges, without having to deal with manual synchronization. And where values ​​need to be represented in a human-understandable form, this can be done through a computed property - for example, like this .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question