mirror of
https://github.com/directus/directus.git
synced 2026-01-31 12:18:02 -05:00
Tweak equality check of input nullable
This commit is contained in:
@@ -201,7 +201,7 @@ export default defineComponent({
|
||||
function emitValue(event: InputEvent) {
|
||||
let value = (event.target as HTMLInputElement).value;
|
||||
|
||||
if (props.nullable === true && value === '') {
|
||||
if (props.nullable === true && !value) {
|
||||
emit('input', null);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ export default defineComponent({
|
||||
});
|
||||
|
||||
const _template = computed(() => {
|
||||
return props.template || `{{ ${primaryKeyField.value.field} }}`;
|
||||
return props.template || `{{ ${primaryKeyField.value!.field} }}`;
|
||||
});
|
||||
|
||||
return { relatedCollection, primaryKeyField, getLinkForItem, _template };
|
||||
|
||||
Reference in New Issue
Block a user