mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
feat(all): add CustomEvents types to components that emit events (#23956)
resolves #22925 BREAKING CHANGE: The `RadioChangeEventDetail` interface has been removed in favor of `RadioGroupChangeEventDetail`.
This commit is contained in:
@ -24,6 +24,26 @@ The iOS native `ion-refresher` relies on rubber band scrolling in order to work
|
||||
|
||||
Using the MD native `ion-refresher` requires setting the `pullingIcon` property on `ion-refresher-content` to the value of one of the available spinners. See the [ion-spinner Documentation](../spinner#properties) for accepted values. `pullingIcon` defaults to the `circular` spinner on MD.
|
||||
|
||||
## Interfaces
|
||||
|
||||
### RefresherEventDetail
|
||||
|
||||
```typescript
|
||||
interface RefresherEventDetail {
|
||||
complete(): void;
|
||||
}
|
||||
```
|
||||
|
||||
### RefresherCustomEvent
|
||||
|
||||
While not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.
|
||||
|
||||
```typescript
|
||||
interface RefresherCustomEvent extends CustomEvent {
|
||||
detail: RefresherEventDetail;
|
||||
target: HTMLIonRefresherElement;
|
||||
}
|
||||
```
|
||||
|
||||
<!-- Auto Generated Below -->
|
||||
|
||||
|
||||
@ -2,3 +2,8 @@
|
||||
export interface RefresherEventDetail {
|
||||
complete(): void;
|
||||
}
|
||||
|
||||
export interface RefresherCustomEvent extends CustomEvent {
|
||||
detail: RefresherEventDetail;
|
||||
target: HTMLIonRefresherElement;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user