mirror of
https://github.com/directus/directus.git
synced 2026-02-02 12:25:09 -05:00
Default field sort order to database ordinal sort
And use alphabetical where appropriate Fixes #4341
This commit is contained in:
@@ -313,7 +313,7 @@ export default defineComponent({
|
||||
const junctionFields = computed(() => {
|
||||
if (!junctionCollection.value) return [];
|
||||
|
||||
return fieldsStore.getFieldsForCollection(junctionCollection.value).map((field: Field) => ({
|
||||
return fieldsStore.getFieldsForCollectionAlphabetical(junctionCollection.value).map((field: Field) => ({
|
||||
text: field.field,
|
||||
value: field.field,
|
||||
disabled:
|
||||
|
||||
@@ -346,7 +346,7 @@ export default defineComponent({
|
||||
const junctionFields = computed(() => {
|
||||
if (!junctionCollection.value) return [];
|
||||
|
||||
return fieldsStore.getFieldsForCollection(junctionCollection.value).map((field: Field) => ({
|
||||
return fieldsStore.getFieldsForCollectionAlphabetical(junctionCollection.value).map((field: Field) => ({
|
||||
text: field.field,
|
||||
value: field.field,
|
||||
disabled:
|
||||
|
||||
@@ -248,12 +248,14 @@ export default defineComponent({
|
||||
const fields = computed(() => {
|
||||
if (!state.relations[0].many_collection) return [];
|
||||
|
||||
return fieldsStore.getFieldsForCollection(state.relations[0].many_collection).map((field: Field) => ({
|
||||
text: field.field,
|
||||
value: field.field,
|
||||
disabled:
|
||||
!field.schema || field.schema?.is_primary_key || field.type !== currentCollectionPrimaryKey.value.type,
|
||||
}));
|
||||
return fieldsStore
|
||||
.getFieldsForCollectionAlphabetical(state.relations[0].many_collection)
|
||||
.map((field: Field) => ({
|
||||
text: field.field,
|
||||
value: field.field,
|
||||
disabled:
|
||||
!field.schema || field.schema?.is_primary_key || field.type !== currentCollectionPrimaryKey.value.type,
|
||||
}));
|
||||
});
|
||||
|
||||
const collectionMany = computed({
|
||||
|
||||
Reference in New Issue
Block a user