Skip to content

Load async data before Dialog appears and Reset TabView selection #244

@ammar91

Description

@ammar91

I have a page similar to (http://www.primefaces.org/primeng/#/datatablecrud) where I am using dialog for add/edit records. But instead of having a dialog in same component (like above demo), I created a nested component for a dialog. There are two things I am looking for,

  1. When click on row (to edit record), I am passing the parameters ('recordId' and 'display') to the nested component. Since I am setting the 'display' property of a nested component to 'true' from parent component, the dialog immediately pops up. So the problem is, dialog appear before data arrive from remote. I used 'onBeforeShow' event to delay the dialog appearance until the promise resolve but that doesn't seems to be working as expected. How to handle this?

  2. I am using TabView inside Dialog as well. What I noticed, If I changed the tab (let say, I am on 2nd tab) before closing the dialog and next time when it's open the 2nd tab remain selected. How to reset the tab?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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