Commit 444680a 1 parent 51f0208 commit 444680a Copy full SHA for 444680a
File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,9 @@ export default class Base extends React.Component {
199
199
dataSource : this . setDataSource ( this . props ) ,
200
200
width : 100 ,
201
201
highlightKey :
202
- 'highlightKey' in props ? props . highlightKey : props . defaultHighlightKey || props . defaultValue ,
202
+ 'highlightKey' in props
203
+ ? props . highlightKey
204
+ : props . value || props . defaultHighlightKey || props . defaultValue ,
203
205
srReader : '' ,
204
206
} ;
205
207
Original file line number Diff line number Diff line change @@ -270,6 +270,10 @@ class Select extends Base {
270
270
Object . assign ( state , {
271
271
highlightKey : nextProps . highlightKey ,
272
272
} ) ;
273
+ } else if ( 'value' in nextProps && nextProps . value !== prevState . value && nextProps . mode === 'single' ) {
274
+ Object . assign ( state , {
275
+ highlightKey : nextProps . value ,
276
+ } ) ;
273
277
}
274
278
275
279
if ( 'searchValue' in nextProps && nextProps . searchValue !== prevState . searchValue ) {
You can’t perform that action at this time.
0 commit comments