-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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(accordion-group): correct accordion is open on load #28510
Merged
liamdebeasi
merged 2 commits into
ionic-team:main
from
medbenmakhlouf:angular-ion-accordion
Nov 13, 2023
Merged
fix(accordion-group): correct accordion is open on load #28510
liamdebeasi
merged 2 commits into
ionic-team:main
from
medbenmakhlouf:angular-ion-accordion
Nov 13, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
3 tasks
medbenmakhlouf
changed the title
trigger value change after the component has finished loading
fix(accordion-group): emit value change on componentDidLoad
Nov 10, 2023
liamdebeasi
suggested changes
Nov 13, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a dev build with your fix: 7.5.5-dev.11699885804.1d8011d5
I tested it in your sample app, and the fix is resolved. Thanks for contributing! I left one suggestion on the code comment, but everything else looks good.
liamdebeasi
approved these changes
Nov 13, 2023
liamdebeasi
changed the title
fix(accordion-group): emit value change on componentDidLoad
fix(accordion-group): correct child accordion is opened on load
Nov 13, 2023
liamdebeasi
changed the title
fix(accordion-group): correct child accordion is opened on load
fix(accordion-group): correct accordion is open on load
Nov 13, 2023
Merged. Thank you for the PR! |
2 tasks
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 17, 2024
Issue number: resolves #28816 --------- <!-- 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. --> The value is set on Segment asynchronously when binding it in Angular. However, the timing works out such that the value changes after `connectedCallback` is fired but before any Stencil Watchers are configured. As a result, our `value` property watcher does not fire which causes `ionSelect` to not be emitted. Segment Buttons rely on this event to know when to update their state (if the value changes such that a segment button is now selected). This results in a checked segment button not appearing checked. This is similar to other issues that have been fixed: #28510 #28488 #28526 ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Segment now emits `ionSelect` on `componentDidLoad` so that any descendant segment buttons can update correctly. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- 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.6.5-dev.11705415448.16878103` This is a timing issue with Stencil, so I am unable to write a reliable automated test. Reviewers should test the dev build in the repro provided in the linked issue.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue number: resolves #28506
What is the current behavior?
ion-accordion-group would not set the value when using it as a Angular standalone component and data binding:
The problem here is Angular is setting the value of the accordion group after the component has been initialized (but not loaded) and before the component watchers are setup, so valueChanged does not fire automatically.
What is the new behavior?
Does this introduce a breaking change?
Other information