File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
core/src/components/searchbar Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 143
143
pointer-events : none ;
144
144
}
145
145
146
+ :host (.searchbar-no-animate ) .searchbar-search-icon ,
147
+ :host (.searchbar-no-animate ) .searchbar-input ,
148
+ :host (.searchbar-no-animate ) .searchbar-cancel-button {
149
+ transition-duration : 0ms ;
150
+ }
146
151
147
152
// Searchbar Color
148
153
// -----------------------------------------
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export class Searchbar implements ComponentInterface {
24
24
@Prop ( { context : 'document' } ) doc ! : Document ;
25
25
26
26
@State ( ) focused = false ;
27
+ @State ( ) noAnimate = true ;
27
28
28
29
/**
29
30
* The color to use from your application's color palette.
@@ -151,6 +152,10 @@ export class Searchbar implements ComponentInterface {
151
152
componentDidLoad ( ) {
152
153
this . positionElements ( ) ;
153
154
this . debounceChanged ( ) ;
155
+
156
+ setTimeout ( ( ) => {
157
+ this . noAnimate = false ;
158
+ } , 300 ) ;
154
159
}
155
160
156
161
/**
@@ -328,10 +333,13 @@ export class Searchbar implements ComponentInterface {
328
333
}
329
334
330
335
hostData ( ) {
336
+ const animated = this . animated && this . config . getBoolean ( 'animated' , true ) ;
337
+
331
338
return {
332
339
class : {
333
340
...createColorClasses ( this . color ) ,
334
- 'searchbar-animated' : this . animated && this . config . getBoolean ( 'animated' , true ) ,
341
+ 'searchbar-animated' : animated ,
342
+ 'searchbar-no-animate' : animated && this . noAnimate ,
335
343
'searchbar-has-value' : ( this . getValue ( ) !== '' ) ,
336
344
'searchbar-show-cancel' : this . showCancelButton ,
337
345
'searchbar-left-aligned' : this . shouldAlignLeft ,
You can’t perform that action at this time.
0 commit comments