Skip to content

bug: [v7.5] ion-accordion-group doesn't work with variables with standalone components #28506

Closed

Description

@medbenmakhlouf

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

I refactored my app to use the new standalone components. I found, that the accordion-group doesn't work, if the "value" property comes from a variable.

I forked the original demo code from stackblitz, here is my updated code: https://stackblitz.com/edit/angular-vquurr-sddthd

You can see: when we pass the value property from a variable, it doesn't work. With simple string, it works as expected.****

Expected Behavior

The accordion group works as it works with module based version.

Steps to Reproduce

See my code

Code Reproduction URL

https://stackblitz.com/edit/angular-vquurr-sddthd

Ionic Info

v7.5

Additional Information

No response

Activity

  1. liamdebeasi commented on Nov 9, 2023

    @liamdebeasi
    Contributor

    Thanks! Are you interested in submitting a PR for this? The fix should be to call this.valueChanged() in the componentDidLoad method on ion-accordion-group:

    The problem here is Angular is setting the value of the accordion group after the component has been initialized (but not loaded) and before the component watchers are setup, so valueChanged does not fire automatically.

  2. medbenmakhlouf commented on Nov 10, 2023

    @medbenmakhlouf
    ContributorAuthor

    Thanks @liamdebeasi ! just submitted a PR here : #28510

  3. added a commit that references this issue on Nov 13, 2023
    a000dd2
  4. ionitron-bot commented on Dec 13, 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.

  5. locked and limited conversation to collaborators on Dec 13, 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

    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