Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(segment-button): update checked state on render #27183

Merged
merged 1 commit into from
Apr 12, 2023
Merged

Conversation

liamdebeasi
Copy link
Contributor

@liamdebeasi liamdebeasi commented Apr 12, 2023

This backports #26970 to v6.

resolves #26830

<!-- Please refer to our contributing documentation for any questions on
submitting a pull request, or let us know here if you need any help:
https://ionicframework.com/docs/building/contributing -->

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](https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#modifying-documentation)
for details.
- [x] Build (`npm run build`) was run locally and any changes were
pushed
- [x] Lint (`npm run lint`) has passed locally and any fixes were made
for failures

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

<!-- Please try to limit your pull request to one type, submit multiple
pull requests if needed. -->

Please check the type of change your PR introduces:
- [x] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):

<!-- Please describe the current behavior that you are modifying. -->

In v7, asynchronously assigning a value to `ion-segment` and
`ion-segment-button` can cause the `ion-segment` to render without an
active value (segment button does not show as checked).

<!-- Issues are required for both bug fixes and features. -->
Issue URL: resolves #26830

<!-- Please describe the behavior or changes that are being added by
this PR. -->

- The `ion-segment-button` checked state is synced with the parent
`ion-segment`, when the component finishes the initial render.

- [ ] Yes
- [x] No

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

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Dev-build: `7.0.0-dev.11678736268.18a0beb1` ✅

---------

Co-authored-by: Liam DeBeasi <[email protected]>
@stackblitz
Copy link

stackblitz bot commented Apr 12, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions github-actions bot added the package: core @ionic/core package label Apr 12, 2023
@liamdebeasi liamdebeasi changed the title fix(segment-button): update checked state on render (#26970) fix(segment-button): update checked state on render Apr 12, 2023
@liamdebeasi liamdebeasi marked this pull request as ready for review April 12, 2023 15:10
@liamdebeasi liamdebeasi requested a review from a team as a code owner April 12, 2023 15:10
@liamdebeasi liamdebeasi merged commit ae9689b into 6.7.x Apr 12, 2023
@liamdebeasi liamdebeasi deleted the segment-v6 branch April 12, 2023 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants