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:
@ -9,6 +9,19 @@ Both `ion-tabs` and `ion-tab-bar` can be used as standalone elements. They don
|
||||
|
||||
The `ion-tab-bar` needs a slot defined in order to be projected to the right place in an `ion-tabs` component.
|
||||
|
||||
## Interfaces
|
||||
|
||||
### TabsCustomEvent
|
||||
|
||||
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 TabsCustomEvent extends CustomEvent {
|
||||
detail: { tab: string };
|
||||
target: HTMLIonTabsElement;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
<!-- Auto Generated Below -->
|
||||
|
||||
|
||||
4
core/src/components/tabs/tabs-interface.ts
Normal file
4
core/src/components/tabs/tabs-interface.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export interface TabsCustomEvent extends CustomEvent {
|
||||
detail: { tab: string };
|
||||
target: HTMLIonTabsElement;
|
||||
}
|
||||
Reference in New Issue
Block a user