mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
fix(spinner): fix default spinner logic for relevant components (#17660)
- In the **`loading`** component, fallback to `spinner` icon config before platform default. - In both **`refresher`** & **`infinite-scroll`** components, use platform default as final fallback. - In **`infinite-scroll`** test templates, and the _basic_ **`virtual-scroll`** test template, fix loading _spinner_ and _text_ attributes. fixes #17659
This commit is contained in:
committed by
Brandy Carney
parent
b5a393bd48
commit
9c48fa715d
@ -1,12 +1,14 @@
|
||||
import { Component, ComponentInterface, Prop } from '@stencil/core';
|
||||
|
||||
import { Config, SpinnerTypes } from '../../interface';
|
||||
import { Config, Mode, SpinnerTypes } from '../../interface';
|
||||
|
||||
@Component({
|
||||
tag: 'ion-refresher-content'
|
||||
})
|
||||
export class RefresherContent implements ComponentInterface {
|
||||
|
||||
mode!: Mode;
|
||||
|
||||
@Prop({ context: 'config' }) config!: Config;
|
||||
|
||||
/**
|
||||
@ -34,7 +36,10 @@ export class RefresherContent implements ComponentInterface {
|
||||
this.pullingIcon = this.config.get('refreshingIcon', 'arrow-down');
|
||||
}
|
||||
if (this.refreshingSpinner === undefined) {
|
||||
this.refreshingSpinner = this.config.get('refreshingSpinner', this.config.get('spinner', 'lines'));
|
||||
this.refreshingSpinner = this.config.get(
|
||||
'refreshingSpinner',
|
||||
this.config.get('spinner', this.mode === 'ios' ? 'lines' : 'crescent')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user