feat(searchbar): ionChange will only emit from user committed changes (#26026)

This commit is contained in:
Amanda Johnston
2022-10-03 15:08:43 -05:00
committed by GitHub
parent 4cb32b6c6b
commit b052d3b262
17 changed files with 302 additions and 70 deletions

View File

@ -1518,11 +1518,17 @@ export class IonRow {
import type { SearchbarChangeEventDetail as ISearchbarSearchbarChangeEventDetail } from '@ionic/core';
export declare interface IonSearchbar extends Components.IonSearchbar {
/**
* Emitted when a keyboard input occurred.
* Emitted when the `value` of the `ion-searchbar` element has changed.
*/
ionInput: EventEmitter<CustomEvent<KeyboardEvent>>;
ionInput: EventEmitter<CustomEvent<KeyboardEvent | null>>;
/**
* Emitted when the value has changed.
* The `ionChange` event is fired for `<ion-searchbar>` 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. This includes modifications made when clicking the clear
or cancel buttons.
*/
ionChange: EventEmitter<CustomEvent<ISearchbarSearchbarChangeEventDetail>>;
/**