fix(editor): Display value of selected matching column in RMC (#7298)

Github issue / Community forum post (link here to close automatically):
This commit is contained in:
Elias Meire
2023-10-04 12:36:24 +02:00
committed by GitHub
parent a040770a27
commit 3aac22b4c1
2 changed files with 50 additions and 5 deletions

View File

@@ -34,18 +34,21 @@ const {
pluralFieldWordCapitalized,
} = useNodeSpecificationValues(props.typeOptions);
const initialValue = computed<string | string[]>(() => {
return resourceMapperTypeOptions.value?.multiKeyMatch === true
? props.initialValue
: props.initialValue[0];
});
// Depending on the mode (multiple/singe key column), the selected value can be a string or an array of strings
const state = reactive({
selected: props.initialValue as string[] | string,
selected: initialValue.value,
});
watch(
() => props.initialValue,
() => {
state.selected =
resourceMapperTypeOptions.value?.multiKeyMatch === true
? props.initialValue
: props.initialValue[0];
state.selected = initialValue.value;
},
);