refactor: remove unnecessary watchers
This commit is contained in:
parent
a4781509c4
commit
a466766c5c
@ -10,7 +10,7 @@
|
||||
}"
|
||||
row-key="name"
|
||||
v-bind="$attrs"
|
||||
ref="listViewRef"
|
||||
@update:selections="$emit('selectionsChanged', Array.from($event || []))"
|
||||
>
|
||||
<ListHeader
|
||||
class="sm:mx-5 mx-3"
|
||||
@ -231,14 +231,7 @@ watch(pageLengthCount, (val, old_value) => {
|
||||
})
|
||||
|
||||
const listBulkActionsRef = ref(null)
|
||||
const listViewRef = ref(null)
|
||||
|
||||
watch(
|
||||
() => Array.from(listViewRef.value?.selections || []),
|
||||
(selections) => {
|
||||
emit('selectionsChanged', selections)
|
||||
},
|
||||
)
|
||||
defineExpose({
|
||||
customListActions: computed(
|
||||
() => listBulkActionsRef.value?.customListActions,
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
resizeColumn: options.resizeColumn,
|
||||
}"
|
||||
row-key="name"
|
||||
ref="listViewRef"
|
||||
@update:selections="$emit('selectionsChanged', Array.from($event || []))"
|
||||
>
|
||||
<ListHeader
|
||||
class="mx-3 sm:mx-5"
|
||||
@ -229,14 +229,6 @@ watch(pageLengthCount, (val, old_value) => {
|
||||
})
|
||||
|
||||
const listBulkActionsRef = ref(null)
|
||||
const listViewRef = ref(null)
|
||||
|
||||
watch(
|
||||
() => Array.from(listViewRef.value?.selections || []),
|
||||
(selections) => {
|
||||
emit('selectionsChanged', selections)
|
||||
},
|
||||
)
|
||||
|
||||
defineExpose({
|
||||
customListActions: computed(
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
resizeColumn: options.resizeColumn,
|
||||
}"
|
||||
row-key="name"
|
||||
ref="listViewRef"
|
||||
@update:selections="$emit('selectionsChanged', Array.from($event || []))"
|
||||
>
|
||||
<ListHeader
|
||||
class="sm:mx-5 mx-3"
|
||||
@ -273,14 +273,6 @@ watch(pageLengthCount, (val, old_value) => {
|
||||
})
|
||||
|
||||
const listBulkActionsRef = ref(null)
|
||||
const listViewRef = ref(null)
|
||||
|
||||
watch(
|
||||
() => Array.from(listViewRef.value?.selections || []),
|
||||
(selections) => {
|
||||
emit('selectionsChanged', selections)
|
||||
},
|
||||
)
|
||||
|
||||
defineExpose({
|
||||
customListActions: computed(
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
resizeColumn: options.resizeColumn,
|
||||
}"
|
||||
row-key="name"
|
||||
ref="listViewRef"
|
||||
@update:selections="$emit('selectionsChanged', Array.from($event || []))"
|
||||
>
|
||||
<ListHeader
|
||||
class="sm:mx-5 mx-3"
|
||||
@ -217,14 +217,6 @@ watch(pageLengthCount, (val, old_value) => {
|
||||
})
|
||||
|
||||
const listBulkActionsRef = ref(null)
|
||||
const listViewRef = ref(null)
|
||||
|
||||
watch(
|
||||
() => Array.from(listViewRef.value?.selections || []),
|
||||
(selections) => {
|
||||
emit('selectionsChanged', selections)
|
||||
},
|
||||
)
|
||||
|
||||
defineExpose({
|
||||
customListActions: computed(
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
resizeColumn: options.resizeColumn,
|
||||
}"
|
||||
row-key="name"
|
||||
ref="listViewRef"
|
||||
@update:selections="$emit('selectionsChanged', Array.from($event || []))"
|
||||
>
|
||||
<ListHeader
|
||||
class="sm:mx-5 mx-3"
|
||||
@ -285,14 +285,6 @@ watch(pageLengthCount, (val, old_value) => {
|
||||
})
|
||||
|
||||
const listBulkActionsRef = ref(null)
|
||||
const listViewRef = ref(null)
|
||||
|
||||
watch(
|
||||
() => Array.from(listViewRef.value?.selections || []),
|
||||
(selections) => {
|
||||
emit('selectionsChanged', selections)
|
||||
},
|
||||
)
|
||||
|
||||
defineExpose({
|
||||
customListActions: computed(
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
resizeColumn: options.resizeColumn,
|
||||
}"
|
||||
row-key="name"
|
||||
ref="listViewRef"
|
||||
@update:selections="$emit('selectionsChanged', Array.from($event || []))"
|
||||
>
|
||||
<ListHeader
|
||||
class="sm:mx-5 mx-3"
|
||||
@ -214,14 +214,6 @@ watch(pageLengthCount, (val, old_value) => {
|
||||
})
|
||||
|
||||
const listBulkActionsRef = ref(null)
|
||||
const listViewRef = ref(null)
|
||||
|
||||
watch(
|
||||
() => Array.from(listViewRef.value?.selections || []),
|
||||
(selections) => {
|
||||
emit('selectionsChanged', selections)
|
||||
},
|
||||
)
|
||||
|
||||
defineExpose({
|
||||
customListActions: computed(
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
resizeColumn: options.resizeColumn,
|
||||
}"
|
||||
row-key="name"
|
||||
ref="listViewRef"
|
||||
@update:selections="$emit('selectionsChanged', Array.from($event || []))"
|
||||
>
|
||||
<ListHeader
|
||||
class="mx-3 sm:mx-5"
|
||||
@ -233,14 +233,6 @@ watch(pageLengthCount, (val, old_value) => {
|
||||
})
|
||||
|
||||
const listBulkActionsRef = ref(null)
|
||||
const listViewRef = ref(null)
|
||||
|
||||
watch(
|
||||
() => Array.from(listViewRef.value?.selections || []),
|
||||
(selections) => {
|
||||
emit('selectionsChanged', selections)
|
||||
},
|
||||
)
|
||||
|
||||
defineExpose({
|
||||
customListActions: computed(
|
||||
|
||||
@ -249,7 +249,9 @@
|
||||
@applyFilter="(data) => viewControls.applyFilter(data)"
|
||||
@applyLikeFilter="(data) => viewControls.applyLikeFilter(data)"
|
||||
@likeDoc="(data) => viewControls.likeDoc(data)"
|
||||
@selectionsChanged="(selections) => viewControls.handleSelectionsChange(selections)"
|
||||
@selectionsChanged="
|
||||
(selections) => viewControls.handleSelectionsChange(selections)
|
||||
"
|
||||
/>
|
||||
<div v-else-if="leads.data" class="flex h-full items-center justify-center">
|
||||
<div
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user