Skip to content

bug: Active segment button not highlighted when nested into async container #28816

Description

@leomazza

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

A segment with dynamic value does not highlight the selected button when nested into an async container.

Expected Behavior

It should be highlighted just as it is usually the case.

Steps to Reproduce

  1. Create an <ion-segment [value]="customValue"> with at least 2 <ion-segment-button>s.
  2. Nest that one into a <div *ngIf="observable$ | async">.
  3. See error

Code Reproduction URL

https://github.com/leomazza/ionic-segment-bug

Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/Users/leomazza/.nvm/versions/node/v20.10.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 7.6.4
@angular-devkit/build-angular : 17.0.10
@angular-devkit/schematics : 17.0.10
@angular/cli : 17.0.10
@ionic/angular-toolkit : 9.0.0

Capacitor:

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

Utility:

cordova-res : 0.15.4
native-run : 2.0.0

System:

NodeJS : v20.10.0 (/Users/leomazza/.nvm/versions/node/v20.10.0/bin/node)
npm : 10.2.3
OS : macOS Unknown

Additional Information

image

NOTE: The issue is with the second segment block. The first segment button is the selected one but it is not shown as active/checked.

Activity

  1. self-assigned this
    on Jan 16, 2024
  2. added
    package: core
    type: bug
    on Jan 16, 2024
  3. liamdebeasi commented on Jan 16, 2024

    @liamdebeasi
    Contributor

    Thanks, I can reproduce this. Here is a dev build if you are interested in testing a proposed fix:

    npm install @ionic/[email protected]
    
  4. removed their assignment
    on Jan 16, 2024
  5. added a commit that references this issue on Jan 17, 2024
    0847c2a
  6. liamdebeasi commented on Jan 17, 2024

    @liamdebeasi
    Contributor

    Thanks for the issue. This has been resolved via #28837, and a fix will be available in an upcoming release of Ionic Framework. Feel free to keep testing the dev build, and let me know if you run into any issues.

  7. ionitron-bot commented on Feb 16, 2024

    @ionitron-bot

    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.

  8. locked and limited conversation to collaborators on Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: coretype: bug

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions