Always center dialog before reopen #2310
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
I'm submitting a ... (check one with "x")
Current behavior
dialog not centered
Expected behavior
call this.center();
What is the motivation / use case for changing the behavior?
I'm reusing the dialog to open various modals with different widths, center() is not being called
Please tell us about your environment:
Angular version: 2.4.0
PrimeNG version: 2.0.3
I'm reusing the p-dialog to display various content in various sizes, the p-dialog is not destroyed
content is dynamically changed
this works nicely except that for each "other then the first" the window is not centered
because of this in your code
This "this.positionInitialized" is updated only once and cannot be changed anymore
means if i reuse the component this values is never reset and thus the window is not centered
if it possible to either
turn positionInitialized into an @input public positionInitialized: boolean || false
or remove that line (not sure why it's there even )
or any other suggestion
thanks
The text was updated successfully, but these errors were encountered: