Skip to content

bug: ion-checkbox label is not visible when in ngfor #27488

@Wasenshi123

Description

@Wasenshi123

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

In my app, I have lists of selection for user to select in many places. I notice that when they are inside modal or popup, it will fail to show label that get value dynamically. (first time is ok but after that it will disappear)

Expected Behavior

ion-checkbox should be able to show label statically or dynamically without bug

Steps to Reproduce

  1. use the new syntax for ion-checkbox (auto label)
  2. wrap it inside ngfor loop
  3. populate some data and show those data in each label of each ion-checkbox
  4. put these inside modal or popup
  5. open the modal/popup once
  6. then next time and so on, it won't show the label

Code Reproduction URL

https://github.com/Wasenshi123/Ionic7/tree/checkbox-UI-bug

Ionic Info

Ionic:

Ionic CLI : 7.1.1 (C:\Users\User\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 7.0.1
@angular-devkit/build-angular : 15.2.5
@angular-devkit/schematics : 10.1.7
@angular/cli : 15.2.5
@ionic/angular-toolkit : 9.0.0

Capacitor:

Capacitor CLI : 4.7.3
@capacitor/android : 4.7.3
@capacitor/core : 4.7.3
@capacitor/ios : 4.7.3

Utility:

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

System:

NodeJS : v18.16.0 (C:\Program Files\nodejs\node.exe)
npm : 9.5.1
OS : Windows 10

Additional Information

I have tried wrapping ion-checkbox in ion-item and also only ion-checkbox version, both result in the same issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions