Vue RangeSlider - Handle the Value Change Event

To process new RangeSlider values, you need to handle the value change event. If the handling function is not going to be changed during the lifetime of the UI component, assign it to the onValueChanged property when you configure the UI component.

  • <template>
  • <DxRangeSlider
  • v-model:start="startValue"
  • v-model:end="endValue"
  • @value-changed="handleValueChange"
  • />
  • </template>
  •  
  • <script>
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import { DxRangeSlider } from 'devextreme-vue/range-slider';
  •  
  • export default {
  • components: {
  • DxRangeSlider
  • },
  • data() {
  • return {
  • startValue: 20,
  • endValue: 60
  • };
  • },
  • methods: {
  • handleValueChange(e) {
  • const newStartValue = e.start;
  • const newEndValue = e.end;
  • // Event handling commands go here
  • }
  • }
  • }
  • </script>
See Also