diff --git a/src/front/Components/DesignSystem/MultiSelect/index.tsx b/src/front/Components/DesignSystem/MultiSelect/index.tsx index 7c7b3cf3..cb1ca3cc 100644 --- a/src/front/Components/DesignSystem/MultiSelect/index.tsx +++ b/src/front/Components/DesignSystem/MultiSelect/index.tsx @@ -75,9 +75,12 @@ export default class MultiSelect extends React.Component { public override componentDidMount(): void { if (this.props.defaultValue) { + // If default value contains multiple IOptions if (Array.isArray(this.props.defaultValue)) { this.setState({ selectedOptions: this.props.defaultValue }); } + + // If default value is a single IOption if ("label" in this.props.defaultValue) { this.setState({ selectedOptions: [this.props.defaultValue] }); }