Skip to content

Commit 5892497

Browse files
committed
fix(select-input): fix typo, and update code documentation
1 parent f1a7e8d commit 5892497

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/components/inputs/select-input/select-input.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,8 @@ export class SelectInput extends React.Component {
7171
);
7272

7373
/**
74-
* When user sets new value prop, if it was undfined, and gets passed to Select as undfined
75-
* Select will keep previouse state, which will be confusing for the user
76-
* This is why we default to null
77-
* https://react-select.com/props#prop-types
74+
* Select (from react-select) will not update the selected value when the next value gets passed as undefined.
75+
* So we need to pass null instead, so that Select clears the selected value.
7876
*/
7977
return {
8078
selectedOptions: props.isMulti

0 commit comments

Comments
 (0)