Skip to content

Commit

Permalink
Fixed #2266 - Type declaration and export bug on ConfirmationService
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Mar 16, 2022
1 parent 1a20849 commit 9fe6164
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/components/confirmationservice/ConfirmationService.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@ import { ConfirmationOptions } from '../confirmationoptions';
declare const plugin: Plugin;
export default plugin;

interface ConfirmationServiceMethods {
export interface ConfirmationServiceMethods {
/**
* Displays the dialog using the confirmation object options.
* @param {ConfirmationOptions} options - Confirmation Object
*/
require(options: ConfirmationOptions): void;
/**
* Hides the dialog without invoking accept or reject callbacks.
*/
close(): void;
}

Expand Down
26 changes: 26 additions & 0 deletions src/views/confirmdialog/ConfirmDialogDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import ConfirmDialog from 'primevue/confirmdialog';
<ConfirmDialog></ConfirmDialog>

<Button @click="delete()" icon="pi pi-check" label="Confirm"></Button>

</code></pre>

<pre v-code.script><code>
Expand Down Expand Up @@ -202,6 +203,31 @@ export default {
</table>
</div>

<h5>ConfirmationService</h5>
<div class="doc-tablewrapper">
<table class="doc-table">
<thead>
<tr>
<th>Name</th>
<th>Parameters</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>require</td>
<td>confirm: Confirmation Object</td>
<td>Displays the dialog using the confirmation object options.</td>
</tr>
<tr>
<td>close</td>
<td>-</td>
<td>Hides the dialog without invoking accept or reject callbacks.</td>
</tr>
</tbody>
</table>
</div>

<h5>Properties</h5>
<p>Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.</p>
<div class="doc-tablewrapper">
Expand Down
28 changes: 27 additions & 1 deletion src/views/confirmpopup/ConfirmPopupDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import ConfirmPopup from 'primevue/confirmpopup';
&lt;ConfirmPopup&gt;&lt;/ConfirmPopup&gt;

&lt;Button @click="delete($event)" icon="pi pi-check" label="Confirm"&gt;&lt;/Button&gt;

</code></pre>

<pre v-code.script><code>
Expand Down Expand Up @@ -161,7 +162,7 @@ export default {
<td>null</td>
<td>Callback to execute when action is rejected.</td>
</tr>
<tr>
<tr>
<td>acceptLabel</td>
<td>string</td>
<td>null</td>
Expand Down Expand Up @@ -200,6 +201,31 @@ export default {
</tbody>
</table>
</div>

<h5>ConfirmationService</h5>
<div class="doc-tablewrapper">
<table class="doc-table">
<thead>
<tr>
<th>Name</th>
<th>Parameters</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>require</td>
<td>confirm: Confirmation Object</td>
<td>Displays the dialog using the confirmation object options.</td>
</tr>
<tr>
<td>close</td>
<td>-</td>
<td>Hides the dialog without invoking accept or reject callbacks.</td>
</tr>
</tbody>
</table>
</div>

<h5>Properties</h5>
<p>Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.</p>
Expand Down

0 comments on commit 9fe6164

Please sign in to comment.