Skip to content

Commit

Permalink
core: fix value update on select
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahBellaha authored and kmer2016 committed Aug 7, 2024
1 parent 77aebac commit 3090e57
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ui-core/src/components/Select.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React, { useEffect, useState } from 'react';

import cx from 'classnames';

Expand Down Expand Up @@ -44,6 +44,10 @@ const Select = <T,>({
onChange(newSelectedOption);
};

useEffect(() => {
setSelectedOption(value);
}, [value]);

return (
<FieldWrapper
id={id}
Expand Down

0 comments on commit 3090e57

Please sign in to comment.