fix fields reactivity in export drawer (#14695)

This commit is contained in:
Azri Kahar
2022-07-27 23:25:39 +08:00
committed by GitHub
parent 1884c081f5
commit bc27cfadba

View File

@@ -281,6 +281,15 @@ const exportSettings = reactive({
sort: `${primaryKeyField.value?.field ?? ''}`,
});
watch(
fields,
() => {
if (props.layoutQuery?.fields) return;
exportSettings.fields = fields.value?.map((field) => field.field);
},
{ immediate: true }
);
watch(
() => props.layoutQuery,
() => {