@@ -97,6 +97,11 @@ const SingleList = {
9797 }
9898 } ,
9999 watch : {
100+ selectedValue ( newVal ) {
101+ if ( this . $data . currentValue !== newVal ) {
102+ this . setValue ( newVal || '' ) ;
103+ }
104+ } ,
100105 options ( newVal ) {
101106 if ( newVal ) {
102107 this . modifiedOptions = newVal [ this . $props . dataField ]
@@ -122,11 +127,6 @@ const SingleList = {
122127 this . setValue ( newVal ) ;
123128 }
124129 } ,
125- selectedValue ( newVal ) {
126- if ( this . $data . currentValue !== newVal ) {
127- this . setValue ( newVal || '' ) ;
128- }
129- } ,
130130 defaultQuery ( newVal , oldVal ) {
131131 if ( ! isQueryIdentical ( newVal , oldVal , this . $data . currentValue , this . $props ) ) {
132132 this . updateDefaultQueryHandler ( this . $data . currentValue , this . $props ) ;
@@ -472,8 +472,7 @@ const mapStateToProps = (state, props) => ({
472472 isLoading : state . isLoading [ props . componentId ] ,
473473 selectedValue :
474474 ( state . selectedValues [ props . componentId ]
475- && state . selectedValues [ props . componentId ] . value )
476- || '' ,
475+ && state . selectedValues [ props . componentId ] . value ) || '' ,
477476 totalDocumentCount : state . hits [ props . componentId ] && state . hits [ props . componentId ] . total ,
478477 themePreset : state . config . themePreset ,
479478 error : state . error [ props . componentId ] ,
0 commit comments