refs #6704: fix2
This commit is contained in:
parent
972c340fad
commit
e480b17edc
|
@ -142,10 +142,21 @@ export function useArrayData(key, userOptions) {
|
|||
userParams = sanitizerParams(userParams, store?.exprBuilder);
|
||||
|
||||
store.userParams = userParams;
|
||||
|
||||
store.skip = 0;
|
||||
await fetch({ append: false });
|
||||
return { filter, params };
|
||||
}
|
||||
async function removeFilter({ filter, params }) {
|
||||
if (filter) store.userFilter = Object.assign(store.userFilter, filter);
|
||||
|
||||
let userParams = Object.assign({}, store.userParams, params);
|
||||
userParams = sanitizerParams(userParams, store?.exprBuilder);
|
||||
|
||||
store.userParams = userParams;
|
||||
store.skip = 0;
|
||||
await loadMore({ append: false });
|
||||
return { filter, params };
|
||||
}
|
||||
|
||||
function sanitizerParams(params, exprBuilder) {
|
||||
for (const param in params) {
|
||||
|
@ -200,6 +211,7 @@ export function useArrayData(key, userOptions) {
|
|||
fetch,
|
||||
applyFilter,
|
||||
addFilter,
|
||||
removeFilter,
|
||||
refresh,
|
||||
destroy,
|
||||
loadMore,
|
||||
|
|
|
@ -9,7 +9,7 @@ import VnInputDate from 'components/common/VnInputDate.vue';
|
|||
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||
import VnSelectCreate from 'src/components/common/VnSelectCreate.vue';
|
||||
import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue';
|
||||
import CustomerCreateNewPostcode from 'src/components/CreateNewPostcodeForm.vue';
|
||||
import CreateNewPostcode from 'src/components/CreateNewPostcodeForm.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
|
||||
|
@ -189,7 +189,7 @@ onMounted(async () => {
|
|||
hide-selected
|
||||
>
|
||||
<template #form>
|
||||
<CustomerCreateNewPostcode
|
||||
<CreateNewPostcode
|
||||
@on-data-saved="onPostcodeCreated($event)"
|
||||
/>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue