mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
@@ -267,9 +267,23 @@ const exportSettings = reactive({
|
||||
filter: props.filter,
|
||||
search: props.search,
|
||||
fields: props.layoutQuery?.fields ?? fields.value?.map((field) => field.field),
|
||||
sort: props.layoutQuery?.sort?.[0] ?? `${primaryKeyField.value!.field}`,
|
||||
sort: `${primaryKeyField.value!.field}`,
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.layoutQuery,
|
||||
() => {
|
||||
if (props.layoutQuery?.sort) {
|
||||
if (Array.isArray(props.layoutQuery.sort)) {
|
||||
exportSettings.sort = props.layoutQuery.sort[0];
|
||||
} else {
|
||||
exportSettings.sort = props.layoutQuery.sort;
|
||||
}
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
const format = ref('csv');
|
||||
const location = ref('download');
|
||||
const folder = ref<string>();
|
||||
|
||||
Reference in New Issue
Block a user