diff --git a/scripts/core/ui/components/generic-form/input-types/select_multiple_values.tsx b/scripts/core/ui/components/generic-form/input-types/select_multiple_values.tsx index 550386a20f..8101ae4313 100644 --- a/scripts/core/ui/components/generic-form/input-types/select_multiple_values.tsx +++ b/scripts/core/ui/components/generic-form/input-types/select_multiple_values.tsx @@ -49,13 +49,13 @@ export class SelectMultipleValues extends React.Component { allowMultiple fullWidth kind="synchronous" - getId={(item) => item} - getLabel={(item) => item} - getOptions={() => items != null ? items.map((item) => ({value: item.label})) : []} + getId={(item) => item.id} + getLabel={(item) => item.label} + getOptions={() => items != null ? items.map((item) => ({value: item})) : []} onChange={(item) => { - this.props.onChange(item); + this.props.onChange(item.map(({id}) => id)); }} - value={this.props.value} + value={items.filter(({id}) => this.props.value.includes(id))} disabled={this.props.disabled} label={this.props.formField.label} inlineLabel