forked from verdnatura/salix-front
Fill filter fields with user params
This commit is contained in:
parent
ad085974da
commit
4282463e51
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue