refactor: no need to pass unselectAll method

This commit is contained in:
Shariq Ansari 2024-05-20 21:15:14 +05:30
parent d9da3dfffa
commit fd3fc4448e
6 changed files with 36 additions and 12 deletions

View File

@ -100,10 +100,9 @@
/>
<EditValueModal
v-model="showEditModal"
v-model:unselectAll="unselectAllAction"
doctype="Contact"
:selectedValues="selectedValues"
@reload="list.reload()"
@reload="reload"
/>
</template>
<script setup>
@ -225,6 +224,11 @@ function bulkActions(selections, unselectAll) {
return actions
}
function reload() {
unselectAllAction.value?.()
list.value?.reload()
}
onMounted(() => {
if (!list.value?.data) return
setupListActions(list.value.data, {

View File

@ -132,10 +132,9 @@
/>
<EditValueModal
v-model="showEditModal"
v-model:unselectAll="unselectAllAction"
doctype="CRM Deal"
:selectedValues="selectedValues"
@reload="list.reload()"
@reload="reload"
/>
</template>
@ -276,6 +275,11 @@ function bulkActions(selections, unselectAll) {
return actions
}
function reload() {
unselectAllAction.value?.()
list.value?.reload()
}
onMounted(() => {
if (!list.value?.data) return
setupListActions(list.value.data, {

View File

@ -86,10 +86,9 @@
/>
<EditValueModal
v-model="showEditModal"
v-model:unselectAll="unselectAllAction"
doctype="Email Template"
:selectedValues="selectedValues"
@reload="list.reload()"
@reload="reload"
/>
</template>
<script setup>
@ -210,6 +209,11 @@ function bulkActions(selections, unselectAll) {
return actions
}
function reload() {
unselectAllAction.value?.()
list.value?.reload()
}
onMounted(() => {
if (!list.value?.data) return
setupListActions(list.value.data, {

View File

@ -141,10 +141,9 @@
/>
<EditValueModal
v-model="showEditModal"
v-model:unselectAll="unselectAllAction"
doctype="CRM Lead"
:selectedValues="selectedValues"
@reload="list.reload()"
@reload="reload"
/>
</template>
@ -285,6 +284,11 @@ function bulkActions(selections, unselectAll) {
return actions
}
function reload() {
unselectAllAction.value?.()
list.value?.reload()
}
onMounted(() => {
if (!list.value?.data) return
setupListActions(list.value.data, {

View File

@ -86,10 +86,9 @@
/>
<EditValueModal
v-model="showEditModal"
v-model:unselectAll="unselectAllAction"
doctype="CRM Organization"
:selectedValues="selectedValues"
@reload="list.reload()"
@reload="reload"
/>
</template>
<script setup>
@ -210,6 +209,11 @@ function bulkActions(selections, unselectAll) {
return actions
}
function reload() {
unselectAllAction.value?.()
list.value?.reload()
}
onMounted(() => {
if (!list.value?.data) return
setupListActions(list.value.data, {

View File

@ -99,10 +99,9 @@
/>
<EditValueModal
v-model="showEditModal"
v-model:unselectAll="unselectAllAction"
doctype="CRM Task"
:selectedValues="selectedValues"
@reload="list.reload()"
@reload="reload"
/>
</template>
<script setup>
@ -228,6 +227,11 @@ function bulkActions(selections, unselectAll) {
return actions
}
function reload() {
unselectAllAction.value?.()
list.value?.reload()
}
onMounted(() => {
if (!list.value?.data) return
setupListActions(list.value.data, {