fix: handler reset state
This commit is contained in:
@@ -129,7 +129,7 @@ onMounted(async () => {
|
||||
class="mb-4 xl:mb-5"
|
||||
/>
|
||||
<AppDivisionList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
||||
|
||||
{{ recId }} - {{ recAction }}
|
||||
<Dialog v-model:open="isFormEntryDialogOpen" :title="!!recItem ? title : 'Tambah Divisi'" size="lg" prevent-outside>
|
||||
<AppDivisionEntryForm
|
||||
:schema="DivisionSchema"
|
||||
|
||||
@@ -33,7 +33,8 @@ export function createCrudHandler<T = any>(crud: {
|
||||
if (refresh) refresh()
|
||||
},
|
||||
onFinally: (isSuccess: boolean) => {
|
||||
setTimeout(reset, 300)
|
||||
if (isSuccess) setTimeout(reset, 300)
|
||||
onResetState()
|
||||
isProcessing.value = false
|
||||
},
|
||||
})
|
||||
@@ -58,7 +59,8 @@ export function createCrudHandler<T = any>(crud: {
|
||||
if (refresh) refresh()
|
||||
},
|
||||
onFinally: (isSuccess: boolean) => {
|
||||
setTimeout(reset, 300)
|
||||
if (isSuccess) setTimeout(reset, 300)
|
||||
onResetState()
|
||||
isProcessing.value = false
|
||||
},
|
||||
})
|
||||
@@ -78,6 +80,7 @@ export function createCrudHandler<T = any>(crud: {
|
||||
},
|
||||
onFinally: () => {
|
||||
setTimeout(refresh, 300)
|
||||
onResetState()
|
||||
isProcessing.value = false
|
||||
},
|
||||
})
|
||||
@@ -86,6 +89,7 @@ export function createCrudHandler<T = any>(crud: {
|
||||
function handleCancelForm(reset: () => void) {
|
||||
isFormEntryDialogOpen.value = false
|
||||
isReadonly.value = false
|
||||
onResetState()
|
||||
setTimeout(reset, 300)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user