0
0
Fork 0

refactor: refs #7323 hidden column filter proposal

This commit is contained in:
Jon Elias 2024-07-19 08:18:41 +02:00
parent 6f6ab74220
commit 26cdae2384
2 changed files with 5 additions and 13 deletions

View File

@ -108,20 +108,11 @@ const isLoading = ref(false);
async function search(evt) { async function search(evt) {
if (evt && $props.disableSubmitEvent) return; if (evt && $props.disableSubmitEvent) return;
store.filter.where = Object.entries($props.modelValue).reduce((acc, [key, val]) => { store.filter.where = {};
if (key.indexOf('.') > 0) {
acc[key] = val;
}
return acc;
}, {});
isLoading.value = true; isLoading.value = true;
const filter = { const filter = { ...userParams.value };
...userParams.value,
};
store.userParamsChanged = true; store.userParamsChanged = true;
const { params: newParams } = await arrayData.addFilter({ const { params: newParams } = await arrayData.addFilter({ params: userParams.value });
params: userParams.value,
});
userParams.value = newParams; userParams.value = newParams;
if (!$props.showAll && !Object.values(filter).length) store.data = []; if (!$props.showAll && !Object.values(filter).length) store.data = [];
@ -206,7 +197,7 @@ function formatValue(value) {
color="primary" color="primary"
style="position: fixed; z-index: 1; right: 0; bottom: 0" style="position: fixed; z-index: 1; right: 0; bottom: 0"
icon="search" icon="search"
@click="search($event)" @click="search()"
></QBtn> ></QBtn>
<QForm @submit="search" id="filterPanelForm"> <QForm @submit="search" id="filterPanelForm">
<QList dense> <QList dense>

View File

@ -71,6 +71,7 @@ const columns = computed(() => [
alias: 'mu', alias: 'mu',
inWhere: true, inWhere: true,
}, },
hidden: true,
}, },
{ {
align: 'right', align: 'right',