Skip to content

fix(select): setting options async updates rendered text - #26667

Merged
liamdebeasi merged 9 commits into
mainfrom
FW-836
Jan 25, 2023
Merged

fix(select): setting options async updates rendered text#26667
liamdebeasi merged 9 commits into
mainfrom
FW-836

Conversation

@liamdebeasi

@liamdebeasi liamdebeasi commented Jan 24, 2023

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: resolves #19324

Updating IonSelectOptions does not re-render the IonSelect component (these are not props and ion-select is not using <slot>). As a result, the selected text of an IonSelect does not update. I fixed this issue back in 2019 in 1c9c18b. However, this behavior regressed in 48a2763#diff-62cbe1fafe96a79e15c9c13dbafef8698860cfb31976445de7e1773079061eb6L153. I failed to include a proper test case, which is why this was not caught.

What is the new behavior?

  • When IonSelectOption is mounted the component will now re-render.

Does this introduce a breaking change?

  • Yes
  • No

Other information

@bolt-new-by-stackblitz

Copy link
Copy Markdown

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 Jan 24, 2023
@liamdebeasi liamdebeasi changed the title Fw 836 fix(select): setting options async updates rendered text Jan 24, 2023
@liamdebeasi
liamdebeasi marked this pull request as ready for review January 24, 2023 14:51
@liamdebeasi
liamdebeasi requested a review from a team as a code owner January 24, 2023 14:51
@aliabbaszade1990

Copy link
Copy Markdown

I still have problem using reactive form and data loaded from server

@liamdebeasi

Copy link
Copy Markdown
Contributor Author

@aliabbaszade1990 Please file a new issue with a reproduction.

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.

bug: ion-select doesn't recognize delayed or updated select options

3 participants