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