File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ export default class ModalSelector extends React.Component {
148
148
let newState = { } ;
149
149
let doUpdate = false ;
150
150
if ( prevProps . initValue !== this . props . initValue ) {
151
- newState . selected = this . props . initValue ;
151
+ newState . selected = [ this . props . initValue ] ;
152
152
doUpdate = true ;
153
153
}
154
154
if ( prevProps . visible !== this . props . visible ) {
@@ -356,8 +356,7 @@ export default class ModalSelector extends React.Component {
356
356
if ( this . props . children ) {
357
357
return this . props . children ;
358
358
}
359
- let initSelectStyle =
360
- this . props . initValue === this . state . selected
359
+ let initSelectStyle = this . state . selected . find ( this . state . initValue )
361
360
? [ styles . initValueTextStyle , this . props . initValueTextStyle ]
362
361
: [ styles . selectTextStyle , this . props . selectTextStyle ] ;
363
362
return (
You can’t perform that action at this time.
0 commit comments