fix(plugin-import-export): preview table to include all selected columns regardless of populated data (#12985)
### What? Ensure the export preview table includes all field keys as columns, even if those fields are not populated in any of the returned documents. ### Why? Previously, if none of the documents in the preview result had a value for a given field, that column would be missing entirely from the preview table. ### How? - Introduced a `getFlattenedFieldKeys` utility that recursively extracts all missing flattened field accessors from the collection’s config that are undefined - Updates the preview UI logic to build columns from all flattened keys, not just the first document
This commit is contained in:
@@ -143,6 +143,13 @@ export interface User {
|
||||
hash?: string | null;
|
||||
loginAttempts?: number | null;
|
||||
lockUntil?: string | null;
|
||||
sessions?:
|
||||
| {
|
||||
id: string;
|
||||
createdAt?: string | null;
|
||||
expiresAt: string;
|
||||
}[]
|
||||
| null;
|
||||
password?: string | null;
|
||||
}
|
||||
/**
|
||||
@@ -502,6 +509,13 @@ export interface UsersSelect<T extends boolean = true> {
|
||||
hash?: T;
|
||||
loginAttempts?: T;
|
||||
lockUntil?: T;
|
||||
sessions?:
|
||||
| T
|
||||
| {
|
||||
id?: T;
|
||||
createdAt?: T;
|
||||
expiresAt?: T;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
|
||||
Reference in New Issue
Block a user