File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,11 @@ const mapStateToProps = state => {
2828 }
2929
3030class DepartmentsAutocomplete extends Component {
31+ componentDidMount ( ) {
32+ this . props . searchChanged ( '' ) ;
33+ this . props . handleBlur ( ) ;
34+ }
35+
3136 render ( ) {
3237 const props = this . props ,
3338 items = props . items ,
@@ -57,8 +62,8 @@ DepartmentsAutocomplete.propTypes = {
5762 value : PropTypes . string ,
5863 items : PropTypes . array ,
5964 suggestionsVisible : PropTypes . bool ,
65+ searchChanged : PropTypes . func ,
6066 selectedChanged : PropTypes . func ,
6167 handleFocus : PropTypes . func ,
6268 handleBlur : PropTypes . func
63-
6469}
Original file line number Diff line number Diff line change @@ -28,6 +28,11 @@ const mapStateToProps = state => {
2828 }
2929
3030class ProductsAutocomplete extends Component {
31+ componentDidMount ( ) {
32+ this . props . searchChanged ( '' ) ;
33+ this . props . handleBlur ( ) ;
34+ }
35+
3136 render ( ) {
3237 const props = this . props ,
3338 items = props . items ,
@@ -57,6 +62,7 @@ ProductsAutocomplete.propTypes = {
5762 value : PropTypes . string ,
5863 items : PropTypes . array ,
5964 suggestionsVisible : PropTypes . bool ,
65+ searchChanged : PropTypes . func ,
6066 selectedChanged : PropTypes . func ,
6167 handleFocus : PropTypes . func ,
6268 handleBlur : PropTypes . func
Original file line number Diff line number Diff line change @@ -37,12 +37,12 @@ const initialState = {
3737 items : [ ] ,
3838 search : '' ,
3939 selected : '' ,
40- suggestionsVisible : true ,
40+ suggestionsVisible : false ,
4141 products : {
4242 items : [ ] ,
4343 search : '' ,
4444 selected : { } ,
45- suggestionsVisible : true
45+ suggestionsVisible : false
4646 }
4747 } ,
4848 notifications : {
You can’t perform that action at this time.
0 commit comments