Open dialog as maximized

UI Components for Angular
Post Reply
mehmetsahin
Posts: 5
Joined: 15 Aug 2018, 15:32

15 Aug 2018, 15:46

Hi. I want open the dialog as maximized. In other words, i want full screen dialog when open the dialog. How can i do this?

mehmetsahin
Posts: 5
Joined: 15 Aug 2018, 15:32

16 Aug 2018, 16:20

I found solution like this. And it is working good.

Code: Select all

<p-dialog (onShow)="showDialogMaximized($event,dialDetail)" #dialDetail></p-dialog> 

Code: Select all

 showDialogMaximized(event, dialog: Dialog) {
            dialog.maximized = false;
            dialog.toggleMaximize(event);
    }

mhald
Posts: 11
Joined: 01 May 2017, 10:41

27 Sep 2018, 19:59

thnx for you info.

i however had to change the function to:

Code: Select all

  showDialogMaximized(dialog: Dialog) {
      dialog.maximize();
  }
  
to prevent a javascript error message with the toggle function.

testen on PrimeNG 6.1.4

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 14 guests