docs(input, textarea): clarify ionInput and ionChange (#27710)

Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

See https://github.com/ionic-team/ionic-framework/issues/27709

The `ionInput` description is vague and does not clarify that it only
fires as the user types.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Clarified the ionInput description for input and textarea

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
This commit is contained in:
Liam DeBeasi
2023-06-28 11:26:37 -04:00
committed by GitHub
parent 2af5a141dc
commit 458d16e742
4 changed files with 28 additions and 30 deletions

View File

@ -275,18 +275,16 @@ export class Textarea implements ComponentInterface {
}
/**
* The `ionChange` event is fired for `<ion-textarea>` elements when the user
* modifies the element's value. Unlike the `ionInput` event, the `ionChange`
* event is not necessarily fired for each alteration to an element's value.
*
* The `ionChange` event is fired when the element loses focus after its value
* has been modified.
* The `ionChange` event is fired when the user modifies the textarea's value.
* Unlike the `ionInput` event, the `ionChange` event is fired when
* the element loses focus after its value has been modified.
*/
@Event() ionChange!: EventEmitter<TextareaChangeEventDetail>;
/**
* The `ionInput` event fires when the `value` of an `<ion-textarea>` element
* has been changed.
* The `ionInput` event is fired each time the user modifies the textarea's value.
* Unlike the `ionChange` event, the `ionInput` event is fired for each alteration
* to the textarea's value. This typically happens for each keystroke as the user types.
*
* When `clearOnEdit` is enabled, the `ionInput` event will be fired when
* the user clears the textarea by performing a keydown event.