mirror of
https://github.com/directus/directus.git
synced 2026-01-27 14:28:12 -05:00
Rename system-field[-tree] collection prop to collectionName (#18193)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<v-notice v-if="!collectionField && !collection" type="warning">
|
||||
<v-notice v-if="!collectionField && !collectionName" type="warning">
|
||||
{{ t('collection_field_not_setup') }}
|
||||
</v-notice>
|
||||
<v-notice v-else-if="!chosenCollection" type="warning">
|
||||
@@ -30,7 +30,7 @@ export default defineComponent({
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
collection: {
|
||||
collectionName: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
@@ -57,7 +57,7 @@ export default defineComponent({
|
||||
|
||||
const values = inject('values', ref<Record<string, any>>({}));
|
||||
|
||||
const chosenCollection = computed(() => values.value[props.collectionField] || props.collection);
|
||||
const chosenCollection = computed(() => values.value[props.collectionField] || props.collectionName);
|
||||
|
||||
const { treeList, loadFieldRelations } = useFieldTree(chosenCollection);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<v-notice v-if="!collectionField && !collection" type="warning">
|
||||
<v-notice v-if="!collectionField && !collectionName" type="warning">
|
||||
{{ t('collection_field_not_setup') }}
|
||||
</v-notice>
|
||||
<v-notice v-else-if="selectItems.length === 0" type="warning">
|
||||
@@ -28,7 +28,7 @@ export default defineComponent({
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
collection: {
|
||||
collectionName: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
@@ -69,10 +69,10 @@ export default defineComponent({
|
||||
|
||||
const values = inject('values', ref<Record<string, any>>({}));
|
||||
|
||||
const collection = computed(() => values.value[props.collectionField] || props.collection);
|
||||
const collection = computed(() => values.value[props.collectionField] || props.collectionName);
|
||||
|
||||
const fields = computed(() => {
|
||||
if (!props.collectionField && !props.collection) return [];
|
||||
if (!props.collectionField && !props.collectionName) return [];
|
||||
return fieldsStore.getFieldsForCollection(collection.value);
|
||||
});
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
<p class="type-label">{{ t('sort_field') }}</p>
|
||||
<interface-system-field
|
||||
:value="sortField"
|
||||
:collection="collection"
|
||||
:collection-name="collection"
|
||||
allow-primary-key
|
||||
@input="sortField = $event"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user