fix(refresher): clean up old css if calling refresh method before native refresher is setup (#22640)

resolves #22636
This commit is contained in:
Liam DeBeasi
2020-12-08 10:16:29 -05:00
committed by GitHub
parent a94e2a87fb
commit 8d5ed47a28

View File

@ -378,6 +378,15 @@ export class Refresher implements ComponentInterface {
return;
}
/**
* If using non-native refresher before make sure
* we clean up any old CSS. This can happen when
* a user manually calls the refresh method in a
* component create callback before the native
* refresher is setup.
*/
this.setCss(0, '', false, '');
this.nativeRefresher = true;
const pullingSpinner = this.el.querySelector('ion-refresher-content .refresher-pulling ion-spinner') as HTMLIonSpinnerElement;