Skip to content

[mdExpansionPanel] - Feature request - Lazy load content #8230

Closed

Description

@Supamiu

Bug, feature request, or proposal:

feature request

What is the expected behavior?

Don't create the body until the panel is expanded

What is the current behavior?

The body is created at the panel creation, meaning that if your panel has a large content and it takes time to create a panel body that will probably not even be viewed.

What is the use-case or motivation for changing an existing behavior?

I have expansion panels that can have a lot of content, they sometimes take more than 500ms to render, that's a lot of time. If I put a *ngif in the body binded to the expanded status, it's way better but the expansion collapse is a bit broken because the content immediatly disappears when you collapse.

Activity

  1. julianobrasil commented on Nov 4, 2017

    @julianobrasil
    Contributor

    Not related to your feature request, but more to your use case: have you tried to use a setTimeout to change the expanded status, so you can keep its content visible until the expansion is completely closed?

  2. Supamiu commented on Nov 4, 2017

    @Supamiu
    Author

    using a setTimeout feels bad in my opinion, mainly because I don't know how much time the expansion panel will take to close.

    That being said, it's a great idea for a hotfix if I put this at around a second, while waiting for the feature to be implemented (if it is).

  3. amcdnl commented on Nov 5, 2017

    @amcdnl
    Contributor

    @jelbourn - I wonder if this could use the same treatment as we did for tabs?

  4. self-assigned this
    on Nov 6, 2017
  5. added 9 commits that reference this issue on Nov 6, 2017
    3f608a0
    9dd9c2c
    ac73028
    8d4354c
    932c58e
    5677639
    f6ef924
    1d2c440
    65a3a85
  6. added
    feature
    P3
    on Nov 28, 2017
  7. added a commit that references this issue on Dec 13, 2017
    60ba0a7
  8. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  9. locked and limited conversation to collaborators on Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions