Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -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">
Expand Down Expand Up @@ -30,7 +30,7 @@ export default defineComponent({
type: String,
default: null,
},
collection: {
collectionName: {
type: String,
default: null,
},
Expand All @@ -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);

Expand Down
8 changes: 4 additions & 4 deletions app/src/interfaces/_system/system-field/system-field.vue
@@ -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">
Expand Down Expand Up @@ -28,7 +28,7 @@ export default defineComponent({
type: String,
default: null,
},
collection: {
collectionName: {
type: String,
default: null,
},
Expand Down Expand Up @@ -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);
});

Expand Down
2 changes: 1 addition & 1 deletion app/src/views/private/components/export-sidebar-detail.vue
Expand Up @@ -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"
/>
Expand Down