mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Merge pull request #231 from directus/m2m-fix
m2m fix option missing and junction primaryField selectable
This commit is contained in:
@@ -8,6 +8,19 @@ export default defineInterface(({ i18n }) => ({
|
||||
component: InterfaceManyToMany,
|
||||
relationship: 'm2m',
|
||||
types: ['alias'],
|
||||
options: [],
|
||||
options: [
|
||||
{
|
||||
field: 'fields',
|
||||
type: 'json',
|
||||
name: i18n.tc('field', 0),
|
||||
meta: {
|
||||
interface: 'tags',
|
||||
width: 'full',
|
||||
options: {
|
||||
placeholder: i18n.t('readable_fields_copy'),
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
recommendedDisplays: ['related-values'],
|
||||
}));
|
||||
|
||||
@@ -110,7 +110,9 @@ export default defineComponent({
|
||||
text: field.field,
|
||||
value: field.field,
|
||||
disabled:
|
||||
state.relations[0].many_field === field.field || state.relations[1].many_field === field.field,
|
||||
state.relations[0].many_field === field.field ||
|
||||
field.schema?.is_primary_key ||
|
||||
state.relations[1].many_field === field.field,
|
||||
}));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user