Skip to content

feat(checkbox): ionChange fires on user interaction - #25923

Merged
liamdebeasi merged 10 commits into
feature-7.0from
FW-2030
Sep 13, 2022
Merged

liamdebeasi merged 10 commits into
feature-7.0from
FW-2030

Conversation

@liamdebeasi

@liamdebeasi liamdebeasi commented Sep 12, 2022 •

Copy link
Copy Markdown
Contributor

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
    • Some docs updates need to be made in the ionic-docs repo, in a separate PR. See the contributing guide for details.
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue URL: N/A internal ticket

What is the new behavior?

  • ion-checkbox now emits ionChange whenever the native change event fires on <input type="checkbox" />.

Does this introduce a breaking change?

  • Yes
  • No

ionChange is no longer emitted when the checked property of ion-checkbox is modified externally. ionChange is only emitted from user committed changes, such as clicking or tapping the checkbox.

Other information

@github-actions github-actions Bot added package: angular @ionic/angular package package: core @ionic/core package labels Sep 12, 2022
@liamdebeasi liamdebeasi changed the title Fw 2030 feat(checkbox): ionChange fires on user interaction Sep 12, 2022
aria-checked={`${checked}`}
disabled={disabled}
id={inputId}
onChange={this.toggleChecked}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open to keeping this as an onClick listener. I did not see any noticeable differences, but using onChange may make the standalone form component change a bit easier for ion-checkbox.

@liamdebeasi
liamdebeasi marked this pull request as ready for review September 12, 2022 18:22
@liamdebeasi
liamdebeasi requested a review from a team September 12, 2022 18:22
@averyrousseau
averyrousseau requested a review from a team September 13, 2022 18:33
@liamdebeasi
liamdebeasi merged commit a6b2629 into feature-7.0 Sep 13, 2022
@liamdebeasi
liamdebeasi deleted the FW-2030 branch September 13, 2022 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: angular @ionic/angular package package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants