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:
Liam DeBeasi
2022-11-01 11:30:58 -05:00
committed by GitHub
parent 663750ec17
commit eea6ba996c
10 changed files with 68 additions and 39 deletions

View File

@ -1832,6 +1832,7 @@ export class IonText {
}
import type { TextareaChangeEventDetail as ITextareaTextareaChangeEventDetail } from '@ionic/core';
import type { TextareaInputEventDetail as ITextareaTextareaInputEventDetail } from '@ionic/core';
export declare interface IonTextarea extends Components.IonTextarea {
/**
* The `ionChange` event is fired for `<ion-textarea>` elements when the user
@ -1849,7 +1850,7 @@ has been changed.
When `clearOnEdit` is enabled, the `ionInput` event will be fired when
the user clears the textarea by performing a keydown event.
*/
ionInput: EventEmitter<CustomEvent<InputEvent>>;
ionInput: EventEmitter<CustomEvent<ITextareaTextareaInputEventDetail>>;
/**
* Emitted when the input loses focus.
*/