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 {
148148 let newState = { } ;
149149 let doUpdate = false ;
150150 if ( prevProps . initValue !== this . props . initValue ) {
151- newState . selected = this . props . initValue ;
151+ newState . selected = [ this . props . initValue ] ;
152152 doUpdate = true ;
153153 }
154154 if ( prevProps . visible !== this . props . visible ) {
@@ -356,8 +356,7 @@ export default class ModalSelector extends React.Component {
356356 if ( this . props . children ) {
357357 return this . props . children ;
358358 }
359- let initSelectStyle =
360- this . props . initValue === this . state . selected
359+ let initSelectStyle = this . state . selected . find ( this . state . initValue )
361360 ? [ styles . initValueTextStyle , this . props . initValueTextStyle ]
362361 : [ styles . selectTextStyle , this . props . selectTextStyle ] ;
363362 return (
You can’t perform that action at this time.
0 commit comments