From 3090e57cb9a63270d945f4c088654932c4cfbbce Mon Sep 17 00:00:00 2001 From: SarahBellaha Date: Wed, 7 Aug 2024 15:58:51 +0200 Subject: [PATCH] core: fix value update on select --- ui-core/src/components/Select.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui-core/src/components/Select.tsx b/ui-core/src/components/Select.tsx index 725fee398..0f484019c 100644 --- a/ui-core/src/components/Select.tsx +++ b/ui-core/src/components/Select.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import React, { useEffect, useState } from 'react'; import cx from 'classnames'; @@ -44,6 +44,10 @@ const Select = ({ onChange(newSelectedOption); }; + useEffect(() => { + setSelectedOption(value); + }, [value]); + return (