Skip to content

Commit

Permalink
Merge pull request #861 from vrk-kpa/fix/singleselect-controlled-state
Browse files Browse the repository at this point in the history
[Bugfix] SingleSelect input value in controlled state
  • Loading branch information
riitasointi authored Jun 20, 2024
2 parents 67ab466 + bb3c570 commit 0ec78ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/Form/Select/SingleSelect/SingleSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,9 @@ class BaseSingleSelect<T> extends Component<
);
if (matchingItem) {
resolvedInputValue =
matchingItem.labelText || prevState.filterInputValue;
matchingItem.labelText && !prevState.filterMode
? matchingItem.labelText
: prevState.filterInputValue;
}
}

Expand Down

0 comments on commit 0ec78ac

Please sign in to comment.