Merge branch 'main' of github.com:directus/next into main

This commit is contained in:
rijkvanzanten
2020-09-09 15:17:32 -04:00
3 changed files with 20 additions and 4 deletions

View File

@@ -137,8 +137,9 @@ export default defineComponent({
const { year, month, date, hours, minutes, seconds, period } = newValue;
const asDate = new Date(year, month, date, period === 'am' ? hours : hours + 12, minutes, seconds);
emit('input', formatISO(asDate));
if(valueAsDate.value?.getTime() != asDate.getTime())
emit('input', formatISO(asDate));
}
},
{

View File

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

View File

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