fix(filters): do not watch debounced
This commit is contained in:
parent
3ab22d8e06
commit
161bb1b192
@ -48,8 +48,7 @@ export const ALPHABETICAL_SORT = 'title'
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {computed, ref} from 'vue'
|
import {computed, ref, watch} from 'vue'
|
||||||
import {watchDebounced} from '@vueuse/core'
|
|
||||||
import Fancycheckbox from '@/components/input/fancycheckbox.vue'
|
import Fancycheckbox from '@/components/input/fancycheckbox.vue'
|
||||||
import FilterInput from '@/components/project/partials/FilterInput.vue'
|
import FilterInput from '@/components/project/partials/FilterInput.vue'
|
||||||
import {useRoute} from 'vue-router'
|
import {useRoute} from 'vue-router'
|
||||||
@ -89,7 +88,7 @@ const params = ref<TaskFilterParams>({
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Using watchDebounced to prevent the filter re-triggering itself.
|
// Using watchDebounced to prevent the filter re-triggering itself.
|
||||||
watchDebounced(
|
watch(
|
||||||
() => modelValue,
|
() => modelValue,
|
||||||
(value: TaskFilterParams) => {
|
(value: TaskFilterParams) => {
|
||||||
const val = {...value}
|
const val = {...value}
|
||||||
@ -100,7 +99,7 @@ watchDebounced(
|
|||||||
)
|
)
|
||||||
params.value = val
|
params.value = val
|
||||||
},
|
},
|
||||||
{immediate: true, debounce: 500, maxWait: 1000},
|
{immediate: true},
|
||||||
)
|
)
|
||||||
|
|
||||||
const labelStore = useLabelStore()
|
const labelStore = useLabelStore()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user