-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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`.
- Loading branch information
1 parent
663750e
commit eea6ba9
Showing
10 changed files
with
68 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
export interface TextareaChangeEventDetail { | ||
value?: string | null; | ||
event?: Event; | ||
} | ||
|
||
export interface TextareaCustomEvent extends CustomEvent { | ||
detail: TextareaChangeEventDetail; | ||
export interface TextareaInputEventDetail { | ||
value?: string | null; | ||
event?: Event; | ||
} | ||
|
||
export interface TextareaCustomEvent<T = TextareaChangeEventDetail> extends CustomEvent { | ||
detail: T; | ||
target: HTMLIonTextareaElement; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters