mirror of
https://github.com/directus/directus.git
synced 2026-01-23 21:18:08 -05:00
fix orderBy to prioritize system fields first (#8602)
This commit is contained in:
@@ -235,7 +235,7 @@ export const useFieldsStore = defineStore({
|
||||
getFieldsForCollection(collection: string): Field[] {
|
||||
return orderBy(
|
||||
this.fields.filter((field) => field.collection === collection),
|
||||
(collection) => (collection.meta?.sort ? Number(collection.meta?.sort) : null)
|
||||
[(field) => field.meta?.system === true, (field) => (field.meta?.sort ? Number(field.meta?.sort) : null)]
|
||||
);
|
||||
},
|
||||
getFieldsForCollectionAlphabetical(collection: string): Field[] {
|
||||
|
||||
Reference in New Issue
Block a user