Skip to content

Commit 22e2a9f

Browse files
authored
feat(module:popconfirm): implement disable for cancel button (#9245)
1 parent ff8419f commit 22e2a9f

6 files changed

Lines changed: 142 additions & 76 deletions

File tree

components/popconfirm/doc/index.en-US.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ description: Pop up a bubble confirmation box for an action.
99

1010
## When To Use
1111

12-
A simple and compact dialog used for asking for user confirmation.
12+
A simple and compact dialog is used for asking for user confirmation.
1313

14-
The difference with the `confirm` modal dialog is that it's more lightweight than the static popped full-screen confirm modal.
14+
The difference with the `confirm` modal dialog is that it's more lightweight than the static-popped full-screen confirm modal.
1515

1616

1717
## API
@@ -20,7 +20,7 @@ The difference with the `confirm` modal dialog is that it's more lightweight tha
2020
### [nz-popconfirm]
2121

2222
| Param | Description | Type | Default value |
23-
| ---------------------------------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
23+
|------------------------------------|---------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
2424
| `[nzPopconfirmArrowPointAtCenter]` | Arrow point at center of the origin | `boolean` | `false` |
2525
| `[nzPopconfirmTitle]` | Title of the confirmation box | `string \| TemplateRef<void>` | - |
2626
| `[nzPopconfirmTitleContext]` | The context of confirmation box title | `object` | - |
@@ -36,19 +36,21 @@ The difference with the `confirm` modal dialog is that it's more lightweight tha
3636
| `[nzPopconfirmOverlayStyle]` | Style of the popconfirm card | `object` | - |
3737
| `[nzPopconfirmBackdrop]` | whether or not the overlay should attach a backdrop | `boolean` | `false` |
3838

39-
| Param | Description | Type | Default value | Global Config |
40-
| ------------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------| -------------------------------------------------------------------- | ------------- | ------------- |
41-
| `[nzCancelText]` | Text of the Cancel button | `string` | `'Cancel'` | - |
42-
| `[nzOkText]` | Text of the Confirm button | `string` | `'Confirm'` | - |
43-
| `[nzOkType]` | Button `type` of the Confirm button | `'primary' \| 'ghost' \| 'dashed' \| 'danger' \| 'default'` | `'primary'` | - |
44-
| `[nzOkDanger]` | Danger status of the OK button. <i>Consistent with the `nzDanger` of the `nz-button`.</i> | `boolean` | `false` | - |
45-
| `[nzOkDisabled]` | prevents a user from interacting with the OK button. <i>Consistent with the `disabled` of the `nz-button`.</i> | `boolean` | `false` | - |
46-
| `[nzCondition]` | Whether to directly emit `onConfirm` without showing Popconfirm | `boolean` | `false` | - |
47-
| `[nzIcon]` | Customize icon of confirmation | `string \| TemplateRef<void>` | - | - |
48-
| `[nzAutoFocus]` | Autofocus a button | `null \| 'ok' \| 'cancel'` | `null` ||
49-
| `[nzBeforeConfirm]` | The hook before the confirmation operation, decides whether to continue responding to the `nzOnConfirm` callback, supports asynchronous verification. | `(() => Observable<boolean> \| Promise<boolean> \| boolean) \| null` | `null` | - |
50-
| `(nzOnCancel)` | Callback of cancel | `EventEmitter<void>` | - | - |
51-
| `(nzOnConfirm)` | Callback of confirmation | `EventEmitter<void>` | - | - |
39+
| Param | Description | Type | Default value | Global Config |
40+
|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|---------------|---------------|
41+
| `[nzCancelText]` | Text of the Cancel button (Deprecated, please use nzCancelButtonProps instead) | `string` | `'Cancel'` | - |
42+
| `[nzOkText]` | Text of the Confirm button (Deprecated, please use nzOkButtonProps instead) | `string` | `'Confirm'` | - |
43+
| `[nzOkType]` | Button `type` of the Confirm button (Deprecated, please use nzOkButtonProps instead) | `'primary' \| 'ghost' \| 'dashed' \| 'danger' \| 'default'` | `'primary'` | - |
44+
| `[nzOkDanger]` | Danger status of the OK button. <i>Consistent with the `nzDanger` of the `nz-button`.</i> (Deprecated, please use nzOkButtonProps instead) | `boolean` | `false` | - |
45+
| `[nzOkDisabled]` | prevents a user from interacting with the OK button. <i>Consistent with the `disabled` of the `nz-button`.</i> (Deprecated, please use nzOkButtonProps instead) | `boolean` | `false` | - |
46+
| `[nzOkButtonProps]` | config object of the ok button | `NzPopConfirmButtonProps` | `null` | - |
47+
| `[nzCancelButtonProps]` | config object of the cancel button | `NzPopConfirmButtonProps` | `null` | - |
48+
| `[nzCondition]` | Whether to directly emit `onConfirm` without showing Popconfirm | `boolean` | `false` | - |
49+
| `[nzIcon]` | Customize icon of confirmation | `string \| TemplateRef<void>` | - | - |
50+
| `[nzAutoFocus]` | Autofocus a button | `null \| 'ok' \| 'cancel'` | `null` ||
51+
| `[nzBeforeConfirm]` | The hook before the confirmation operation, decides whether to continue responding to the `nzOnConfirm` callback, supports asynchronous verification. | `(() => Observable<boolean> \| Promise<boolean> \| boolean) \| null` | `null` | - |
52+
| `(nzOnCancel)` | Callback of cancel | `EventEmitter<void>` | - | - |
53+
| `(nzOnConfirm)` | Callback of confirmation | `EventEmitter<void>` | - | - |
5254

5355
Consult [Tooltip's documentation](/components/tooltip/en#api) to find more APIs.
5456

0 commit comments

Comments
 (0)