iulianraduat / react-select-material-ui

A react SELECT component based on react-select and looking like a material-ui component
MIT License
73 stars 18 forks source link

DefaultValue for MultipleSelect does not work correctly #4

Closed tarhunakau closed 5 years ago

tarhunakau commented 5 years ago

Hi, I found an issue related with default values of MultipleSelect. If my options are strings (['a', 'b', 'c']) and value is ['a'] - it works fine. But if I try to use SelectOption instead strings it works bad:

options=[{ label: 'label1', value: 001 }, { label: 'label2', value: 002 }] values=[001]

It shows values as select options instead labels.

Actual result: 001, 002 Expected result: label1, label2

iulianraduat commented 5 years ago

I will investigate and produce a fix for it. Thanks for reporting it.

iulianraduat commented 5 years ago

@BLRplex I fixed the bug in version 2.0.0. Please try it and let me know if it works as expected.