Skip to content

Commit

Permalink
fix(Select): multiple value order
Browse files Browse the repository at this point in the history
  • Loading branch information
zouxuoz committed May 6, 2019
1 parent b8f4b45 commit d044ba6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Select/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class Select extends React.Component<SelectProps & SelectPropsFromHOCs> {

const selectValue = (
Array.isArray(value)
? options.filter((option) => value.indexOf(option.value) !== -1)
? value.map((val) => options.find((option) => option.value === val)).filter((option) => option !== null)
: options.find((option) => option.value === value)
) || null;

Expand Down

0 comments on commit d044ba6

Please sign in to comment.