mirror of
https://github.com/directus/directus.git
synced 2026-01-29 08:17:55 -05:00
Fix nested system-interface-options usage (#9483)
* Improve null check in list * Fix options syncing in system-interface-options
This commit is contained in:
@@ -52,11 +52,20 @@ export default defineComponent({
|
||||
},
|
||||
},
|
||||
emits: ['input'],
|
||||
setup(props) {
|
||||
setup(props, { emit }) {
|
||||
const { t } = useI18n();
|
||||
|
||||
const { interfaces } = getInterfaces();
|
||||
|
||||
const options = computed({
|
||||
get() {
|
||||
return props.value;
|
||||
},
|
||||
set(newVal: any) {
|
||||
emit('input', newVal);
|
||||
},
|
||||
});
|
||||
|
||||
const values = inject('values', ref<Record<string, any>>({}));
|
||||
|
||||
const selectedInterface = computed(() => {
|
||||
@@ -120,7 +129,7 @@ export default defineComponent({
|
||||
return [...optionsObjectOrArray.standard, ...optionsObjectOrArray.advanced];
|
||||
});
|
||||
|
||||
return { t, selectedInterface, values, usesCustomComponent, optionsFields };
|
||||
return { t, selectedInterface, values, usesCustomComponent, optionsFields, options };
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -269,7 +269,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function emitValue(value: null | any[]) {
|
||||
if (value === null || value.length === 0) {
|
||||
if (!value || value.length === 0) {
|
||||
return emit('input', null);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user