Rename system-field[-tree] collection prop to collectionName (#18193)

This commit is contained in:
Hannes Küttner
2023-04-14 20:18:02 +02:00
committed by GitHub
parent f016e22daf
commit 1e271fa1d0
3 changed files with 8 additions and 8 deletions

View File

@@ -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);

View File

@@ -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);
});

View File

@@ -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"
/>