0
0
Fork 0

Fill filter fields with user params

This commit is contained in:
William Buezas 2024-04-26 14:29:11 -03:00
parent ad085974da
commit 4282463e51
1 changed files with 11 additions and 0 deletions

View File

@ -127,6 +127,17 @@ onMounted(async () => {
type: prop ? prop.type : null,
});
});
// Fill fieldFiltersValues with existent userParams
if (arrayData.store?.userParams) {
fieldFiltersValues.value = Object.entries(arrayData.store?.userParams)
.filter(([key, value]) => value && _moreFields.includes(key))
.map(([key, value]) => ({
name: key,
value,
selectedField: moreFields.value.find((field) => field.name === key),
}));
}
});
</script>