mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(toggle): ionChange will only emit from user committed changes (#26078)
Co-authored-by: Sean Perkins <sean@ionic.io>
This commit is contained in:
@@ -1909,7 +1909,8 @@ export class IonTitle {
|
||||
import type { ToggleChangeEventDetail as IToggleToggleChangeEventDetail } from '@ionic/core';
|
||||
export declare interface IonToggle extends Components.IonToggle {
|
||||
/**
|
||||
* Emitted when the value property has changed.
|
||||
* Emitted when the user switches the toggle on or off. Does not emit
|
||||
when programmatically changing the value of the `checked` property.
|
||||
*/
|
||||
ionChange: EventEmitter<CustomEvent<IToggleToggleChangeEventDetail>>;
|
||||
/**
|
||||
|
||||
@@ -39,7 +39,7 @@ describe('Inputs', () => {
|
||||
cy.get('#reset-button').click();
|
||||
|
||||
cy.get('ion-checkbox#first-checkbox').click();
|
||||
cy.get('ion-toggle').invoke('prop', 'checked', true);
|
||||
cy.get('ion-toggle').first().click();
|
||||
|
||||
cy.get('ion-input').eq(0).type('hola');
|
||||
cy.get('ion-input input').eq(0).blur();
|
||||
|
||||
Reference in New Issue
Block a user