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);
|
userParams = sanitizerParams(userParams, store?.exprBuilder);
|
||||||
|
|
||||||
store.userParams = userParams;
|
store.userParams = userParams;
|
||||||
|
store.skip = 0;
|
||||||
await fetch({ append: false });
|
await fetch({ append: false });
|
||||||
return { filter, params };
|
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) {
|
function sanitizerParams(params, exprBuilder) {
|
||||||
for (const param in params) {
|
for (const param in params) {
|
||||||
|
@ -200,6 +211,7 @@ export function useArrayData(key, userOptions) {
|
||||||
fetch,
|
fetch,
|
||||||
applyFilter,
|
applyFilter,
|
||||||
addFilter,
|
addFilter,
|
||||||
|
removeFilter,
|
||||||
refresh,
|
refresh,
|
||||||
destroy,
|
destroy,
|
||||||
loadMore,
|
loadMore,
|
||||||
|
|
|
@ -9,7 +9,7 @@ import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||||
import VnSelectCreate from 'src/components/common/VnSelectCreate.vue';
|
import VnSelectCreate from 'src/components/common/VnSelectCreate.vue';
|
||||||
import CreateBankEntityForm from 'src/components/CreateBankEntityForm.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 VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ onMounted(async () => {
|
||||||
hide-selected
|
hide-selected
|
||||||
>
|
>
|
||||||
<template #form>
|
<template #form>
|
||||||
<CustomerCreateNewPostcode
|
<CreateNewPostcode
|
||||||
@on-data-saved="onPostcodeCreated($event)"
|
@on-data-saved="onPostcodeCreated($event)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue