0
0
Fork 0

Merge pull request 'ref #5417 filter fixed' (!102) from 5417-fixPaymentsFilter into dev

Reviewed-on: verdnatura/salix-front#102
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Jorge Penadés 2023-10-18 10:41:48 +00:00
commit 81ff6a68da
1 changed files with 3 additions and 3 deletions

View File

@ -41,13 +41,13 @@ onMounted(() => {
const isLoading = ref(false);
async function search() {
const params = JSON.parse(JSON.stringify(userParams.value));
for (const param in params) {
if (params[param] === '' || params[param] === null) {
for (const param in userParams.value) {
if (userParams.value[param] === '' || userParams.value[param] === null) {
delete userParams.value[param];
delete store.userParams[param];
}
}
const params = { ...userParams.value };
isLoading.value = true;
await arrayData.addFilter({ params });
if (!props.showAll && !Object.values(params).length) store.data = [];