Reputation: 3165
Referring to the example for PrimeFaces (Java / JSF) to create a modal dialog, https://www.primefaces.org/showcase/ui/overlay/dialog.xhtml
<p:dialog header="Header" widgetVar="dlg1" minHeight="40" width="350" showEffect="fade">
<p class="m-0">Lorem ipsum dolor sit amet...</p>
</p:dialog>
This creates a modal dialog with a 'X' close button at the right corner. I want a solution to disable this close button for PrimeFaces dialog.
Upvotes: 7
Views: 38681
Reputation: 53
You can use this way: [closable]="false"
to your <p-dialog>
, because PrimeNg is expecting it as a key of the object.
Upvotes: 2
Reputation: 713
Use
:closable="false"
as bellow
<Dialog :closable="false">
Upvotes: 0
Reputation: 3822
That way:
.ui-icon-closethick {
display: none!important;
}
Just inspect that element and find the correct class to modify.
Upvotes: 0
Reputation: 1731
You can just add closable="false"
to your p:dialog
. Then you will not have the 'X' close Button.
Upvotes: 28