Skip to content

bug: ion-segment not properly initialized when in ion-modal #28858

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

Closed
3 tasks done
rusekr opened this issue Jan 19, 2024 · 3 comments
Closed
3 tasks done

bug: ion-segment not properly initialized when in ion-modal #28858

rusekr opened this issue Jan 19, 2024 · 3 comments
Labels

Comments

@rusekr
Copy link

rusekr commented Jan 19, 2024

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

Resume: ion-segment initial value not properly displayed in ion-modal.

Here is simple testcase ionic-angular app https://github.com/rusekr/finstorm/tree/master with one modal and three tabs.

Runs with npm run start. On second tab this is fab with modal. On modal two segments and two radios for one property transactionType. Radios initialized correctly, segments not.

Expected Behavior

ion-segment selects by model segment on modal opened.

Steps to Reproduce

  1. Runs code above with npm run start
  2. Go to second tab.
  3. Click fab with plus sign to open modal.
  4. See correct behaviour of ion-radio buttons and incorrect behavior (all segments deselected) of ion-segment.

Code Reproduction URL

https://github.com/rusekr/finstorm/tree/master

Ionic Info

Ionic:

Ionic CLI : 7.1.5 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 7.6.5
@angular-devkit/build-angular : 17.1.0
@angular-devkit/schematics : 17.1.0
@angular/cli : 17.1.0
@ionic/angular-toolkit : 11.0.0

Capacitor:

Capacitor CLI : 5.6.0
@capacitor/android : 5.6.0
@capacitor/core : 5.6.0
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : 2.0.0

System:

NodeJS : v20.10.0 (/usr/bin/node20)
npm : 10.2.3
OS : Linux 6.6

Additional Information

Tried [value] property instead or alongside ngModel with no luck.

@ionitron-bot ionitron-bot bot added the triage label Jan 19, 2024
@liamdebeasi liamdebeasi self-assigned this Jan 19, 2024
@liamdebeasi
Copy link
Contributor

Thanks for the issue. I am going to close this as a duplicate of #28816. I merged a fix for this a couple days ago, so the fix will be in an upcoming version of Ionic.

@liamdebeasi liamdebeasi closed this as not planned Won't fix, can't repro, duplicate, stale Jan 19, 2024
@liamdebeasi liamdebeasi removed their assignment Jan 19, 2024
@rusekr
Copy link
Author

rusekr commented Jan 19, 2024

Thanks for the info! Added fix as monkey patch for now before new release via patch-package and it works great!

Copy link

ionitron-bot bot commented Feb 18, 2024

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Feb 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants