File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 70
70
} ,
71
71
72
72
onFocus : function ( ) {
73
- this . isOptionsListVisible = true ;
73
+ this . resetOptionsList ( ) ;
74
74
} ,
75
75
76
76
onInput : function ( ) {
91
91
// Up
92
92
event . preventDefault ( ) ;
93
93
if ( ! this . isOptionsListVisible ) {
94
- this . isOptionsListVisible = true ;
95
- this . $ . optionsList . highlightFirst ( ) ;
94
+ this . resetOptionsList ( ) ;
96
95
}
97
96
else {
98
97
this . $ . optionsList . highlightPrevious ( ) ;
102
101
// Down
103
102
event . preventDefault ( ) ;
104
103
if ( ! this . isOptionsListVisible ) {
105
- this . isOptionsListVisible = true ;
106
- this . $ . optionsList . highlightFirst ( ) ;
104
+ this . resetOptionsList ( ) ;
107
105
}
108
106
else {
109
107
this . $ . optionsList . highlightNext ( ) ;
113
111
114
112
onTap : function ( ) {
115
113
this . $ . filter . focus ( ) ;
116
- this . isOptionsListVisible = true ;
114
+ if ( ! this . isOptionsListVisible ) {
115
+ this . resetOptionsList ( ) ;
116
+ }
117
117
} ,
118
118
119
119
placeholderChanged : function ( ) {
125
125
}
126
126
} ,
127
127
128
+ resetOptionsList : function ( ) {
129
+ this . $ . optionsList . highlightFirst ( ) ;
130
+ this . isOptionsListVisible = true ;
131
+ } ,
132
+
128
133
selectedChanged : function ( ) {
129
134
this . isOptionsListVisible = false ;
130
135
this . filterText = '' ;
You can’t perform that action at this time.
0 commit comments