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:
@ -67,4 +67,8 @@ export interface TransitionInstruction {
|
||||
enteringRequiresTransition?: boolean;
|
||||
}
|
||||
|
||||
export interface NavCustomEvent extends CustomEvent {
|
||||
target: HTMLIonNavElement;
|
||||
}
|
||||
|
||||
export { ViewController };
|
||||
|
||||
@ -4,6 +4,17 @@ Nav is a standalone component for loading arbitrary components and pushing new c
|
||||
|
||||
Unlike Router Outlet, Nav is not tied to a particular router. This means that if we load a Nav component, and push other components to the stack, they will not affect the app's overall router. This fits use cases where you could have a modal, which needs its own sub-navigation, without making it tied to the apps URL.
|
||||
|
||||
## Interfaces
|
||||
|
||||
### NavCustomEvent
|
||||
|
||||
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 NavCustomEvent extends CustomEvent {
|
||||
target: HTMLIonNavElement;
|
||||
}
|
||||
```
|
||||
|
||||
<!-- Auto Generated Below -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user