mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(input, textarea): ionInput and ionChange pass event and value (#26176)
BREAKING CHANGE: The `detail` payload for the `ionInput` event on `ion-input` and `ion-textarea` now contains an object with the current `value` as well as the native event that triggered `ionInput`.
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
export interface InputChangeEventDetail {
|
||||
value: string | undefined | null;
|
||||
value?: string | number | null;
|
||||
event?: Event;
|
||||
}
|
||||
|
||||
// We recognize that InputInput is not an ideal naming pattern for this type.
|
||||
// TODO (FW-2199): Explore renaming this type to something more appropriate.
|
||||
export type InputInputEventDetail = InputEvent | Event;
|
||||
export interface InputInputEventDetail {
|
||||
value?: string | number | null;
|
||||
event?: Event;
|
||||
}
|
||||
|
||||
export interface InputCustomEvent extends CustomEvent {
|
||||
detail: InputChangeEventDetail;
|
||||
export interface InputCustomEvent<T = InputChangeEventDetail> extends CustomEvent {
|
||||
detail: T;
|
||||
target: HTMLIonInputElement;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user