vrk-kpa / suomifi-ui-components

Suomi.fi-styleguide in React components
Other
30 stars 15 forks source link

[Bugfix] SingleSelect input value in controlled state #861

Closed LJKaski closed 4 months ago

LJKaski commented 5 months ago

Description

SingleSelect input value didn't behave correctly when both onInputValueChange and onChange were given and onchange altered the parent component state. The input value could not be modified in this case.

This PR provides a suggested solution to the issue.

Related Issue

Closes #857

Motivation and Context

This was a bug reported by users and a service developer

How Has This Been Tested?

Tested by running locally on styleguidist with modified examples.

Release notes

SingleSelect