File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -298,9 +298,11 @@ export class Searchbar extends Ion {
298
298
clearInput ( ) {
299
299
this . ionClear . emit ( this ) ;
300
300
301
- this . value = '' ;
302
- this . onChange ( this . value ) ;
303
- this . ionInput . emit ( this ) ;
301
+ if ( isPresent ( this . value ) && this . value !== '' ) {
302
+ this . value = '' ;
303
+ this . onChange ( this . value ) ;
304
+ this . ionInput . emit ( this ) ;
305
+ }
304
306
305
307
this . blurInput = false ;
306
308
}
Original file line number Diff line number Diff line change @@ -12,23 +12,23 @@ class E2EApp {
12
12
defaultCancel : string = '' ;
13
13
14
14
onClearSearchbar ( searchbar ) {
15
- console . log ( "Clicked clear input on " , searchbar . value ) ;
15
+ console . log ( "ionClear " , searchbar . value ) ;
16
16
}
17
17
18
18
onCancelSearchbar ( searchbar ) {
19
- console . log ( "Clicked cancel button with " , searchbar . value ) ;
19
+ console . log ( "ionCancel " , searchbar . value ) ;
20
20
}
21
21
22
22
triggerInput ( searchbar ) {
23
- console . log ( "Triggered input " , searchbar . value ) ;
23
+ console . log ( "ionInput " , searchbar . value ) ;
24
24
}
25
25
26
26
inputBlurred ( searchbar ) {
27
- console . log ( "Blurred input " , searchbar . value ) ;
27
+ console . log ( "ionBlur " , searchbar . value ) ;
28
28
}
29
29
30
30
inputFocused ( searchbar ) {
31
- console . log ( "Focused input " , searchbar . value ) ;
31
+ console . log ( "ionFocus " , searchbar . value ) ;
32
32
}
33
33
}
34
34
You can’t perform that action at this time.
0 commit comments