forked from verdnatura/salix-front
refactor: refs #7323 hidden column filter proposal
This commit is contained in:
parent
6f6ab74220
commit
26cdae2384
|
@ -108,20 +108,11 @@ const isLoading = ref(false);
|
|||
async function search(evt) {
|
||||
if (evt && $props.disableSubmitEvent) return;
|
||||
|
||||
store.filter.where = Object.entries($props.modelValue).reduce((acc, [key, val]) => {
|
||||
if (key.indexOf('.') > 0) {
|
||||
acc[key] = val;
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
store.filter.where = {};
|
||||
isLoading.value = true;
|
||||
const filter = {
|
||||
...userParams.value,
|
||||
};
|
||||
const filter = { ...userParams.value };
|
||||
store.userParamsChanged = true;
|
||||
const { params: newParams } = await arrayData.addFilter({
|
||||
params: userParams.value,
|
||||
});
|
||||
const { params: newParams } = await arrayData.addFilter({ params: userParams.value });
|
||||
userParams.value = newParams;
|
||||
|
||||
if (!$props.showAll && !Object.values(filter).length) store.data = [];
|
||||
|
@ -206,7 +197,7 @@ function formatValue(value) {
|
|||
color="primary"
|
||||
style="position: fixed; z-index: 1; right: 0; bottom: 0"
|
||||
icon="search"
|
||||
@click="search($event)"
|
||||
@click="search()"
|
||||
></QBtn>
|
||||
<QForm @submit="search" id="filterPanelForm">
|
||||
<QList dense>
|
||||
|
|
|
@ -71,6 +71,7 @@ const columns = computed(() => [
|
|||
alias: 'mu',
|
||||
inWhere: true,
|
||||
},
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
align: 'right',
|
||||
|
|
Loading…
Reference in New Issue