From 08cc7113d92559bc554e8782f962e2c33a5ef2a6 Mon Sep 17 00:00:00 2001 From: Adam Berecz Date: Tue, 20 Dec 2022 11:48:49 +0100 Subject: [PATCH] fix: fix for #60 --- src/composables/useSlider.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/composables/useSlider.js b/src/composables/useSlider.js index 7922209..2e8fbd3 100644 --- a/src/composables/useSlider.js +++ b/src/composables/useSlider.js @@ -207,8 +207,20 @@ export default function useSlider (props, context, dependencies) // ============== WATCHERS ============== + watch(isRange, refresh, { immediate: false }) + watch(min, refresh, { immediate: false }) + watch(max, refresh, { immediate: false }) + watch(step, refresh, { immediate: false }) + watch(orientation, refresh, { immediate: false }) + watch(direction, refresh, { immediate: false }) + watch(tooltips, refresh, { immediate: false }) + watch(merge, refresh, { immediate: false }) + watch(format, refresh, { immediate: false, deep: true }) + watch(options, refresh, { immediate: false, deep: true }) + watch(classes, refresh, { immediate: false, deep: true }) + watch(value, (value, old) => { - if (!old) { + if (!isNullish(old)) { return } @@ -220,17 +232,6 @@ export default function useSlider (props, context, dependencies) refresh() } }, { immediate: false }) - watch(isRange, refresh, { immediate: false }) - watch(min, refresh, { immediate: false }) - watch(max, refresh, { immediate: false }) - watch(step, refresh, { immediate: false }) - watch(orientation, refresh, { immediate: false }) - watch(direction, refresh, { immediate: false }) - watch(tooltips, refresh, { immediate: false }) - watch(merge, refresh, { immediate: false }) - watch(format, refresh, { immediate: false, deep: true }) - watch(options, refresh, { immediate: false, deep: true }) - watch(classes, refresh, { immediate: false, deep: true }) watch(value, (newValue) => { if (isNullish(newValue)) {