mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
relationships: make sort field null if empty (#9735)
This commit is contained in:
@@ -62,7 +62,12 @@
|
||||
|
||||
<div class="sort-field">
|
||||
<v-divider large :inline-title="false">{{ t('sort_field') }}</v-divider>
|
||||
<related-field-select v-model="sortField" :collection="junctionCollection" :placeholder="t('add_sort_field')" />
|
||||
<related-field-select
|
||||
v-model="sortField"
|
||||
:collection="junctionCollection"
|
||||
:placeholder="t('add_sort_field')"
|
||||
:nullable="true"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="relational-triggers">
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
v-model="sortField"
|
||||
:collection="junctionCollection"
|
||||
:placeholder="t('add_sort_field') + '...'"
|
||||
:nullable="true"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
v-model="sortField"
|
||||
:collection="relatedCollection"
|
||||
:placeholder="t('add_sort_field') + '...'"
|
||||
:nullable="true"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<v-input
|
||||
:model-value="modelValue"
|
||||
db-safe
|
||||
:nullable="false"
|
||||
:nullable="nullable"
|
||||
:disabled="disabled"
|
||||
:placeholder="placeholder"
|
||||
:class="{ matches: fieldExists }"
|
||||
@update:model-value="$emit('update:modelValue', $event)"
|
||||
@update:model-value="$emit('update:modelValue', $event.length ? $event : null)"
|
||||
>
|
||||
<template v-if="fields && fields.length > 0 && !disabled" #append>
|
||||
<v-menu show-arrow placement="bottom-end">
|
||||
@@ -65,6 +65,10 @@ export default defineComponent({
|
||||
type: String,
|
||||
default: () => i18n.global.t('foreign_key') + '...',
|
||||
},
|
||||
nullable: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: ['update:modelValue'],
|
||||
setup(props) {
|
||||
|
||||
Reference in New Issue
Block a user