Skip to content

bug: component trigger not working for async ngfor #28524

Closed

Description

@jeroenkroese

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

I have a number of elements that I want to show based on an asynchronous call. When clicking on the button, the popover is not triggered.

this.items$ = of(['item1', 'item2']).pipe(delay(100));

<div *ngFor="let item of items$ | async">
    <ion-button [id]="item"> Show popover </ion-button>
    <ion-popover [trigger]="item">
        <ng-template> Hello world! </ng-template>
    </ion-popover>
</div>

Expected Behavior

Popover shows

Steps to Reproduce

See reproduction

Code Reproduction URL

https://github.com/jeroenkroese/ionic-async-ngfor

Ionic Info

Ionic:

Ionic CLI : 7.1.5 (/Users/jeroenkroese/.nvm/versions/node/v18.15.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 7.5.4
@angular-devkit/build-angular : 17.0.0
@angular-devkit/schematics : 17.0.0
@angular/cli : 17.0.0
@ionic/angular-toolkit : 9.0.0

Capacitor:

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

Utility:

cordova-res : not installed globally
native-run (update available: 2.0.0) : 1.7.4

System:

NodeJS : v18.15.0 (/Users/jeroenkroese/.nvm/versions/node/v18.15.0/bin/node)
npm : 9.5.0
OS : macOS Unknown

Additional Information

No response

Activity

  1. self-assigned this
    on Nov 14, 2023
  2. added
    package: core
    type: bug
    on Nov 14, 2023
  3. liamdebeasi commented on Nov 14, 2023

    @liamdebeasi
    Contributor

    Thanks for the report. Here is a dev build with a proposed fix if you are interested in testing: npm install @ionic/[email protected]

  4. removed their assignment
    on Nov 14, 2023
  5. jeroenkroese commented on Nov 14, 2023

    @jeroenkroese
    Author

    Thanks, Liam! I can confirm that @ionic/[email protected] resolves the issue.

  6. added a commit that references this issue on Nov 29, 2023
    a3cd204
  7. liamdebeasi commented on Nov 29, 2023

    @liamdebeasi
    Contributor

    Thanks for the issue. This has been resolved via #28526, and a fix will be available in an upcoming release of Ionic Framework.

  8. ionitron-bot commented on Dec 29, 2023

    @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.

  9. locked and limited conversation to collaborators on Dec 29, 2023
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