category | type | title | cover |
---|---|---|---|
Components |
Feedback |
Popconfirm |
A simple and compact confirmation dialog of an action.
A simple and compact dialog used for asking for user confirmation.
The difference with the confirm
modal dialog is that it's more lightweight than the static popped full-screen confirm modal.
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
Param | Description | Type | Default value |
---|---|---|---|
[nzPopconfirmArrowPointAtCenter] |
Arrow point at center of the origin | boolean |
false |
[nzPopconfirmTitle] |
Title of the confirmation box | string | TemplateRef<void> |
- |
[nzPopconfirmTrigger] |
Popconfirm trigger mode. If set to null it would not be triggered |
'click' | 'focus' | 'hover' | null |
'hover' |
[nzPopconfirmPlacement] |
The position of the popconfirm relative to the target | 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom' | Array<string> |
'top' |
[nzPopconfirmOrigin] |
Origin of the popconfirm | ElementRef |
- |
[nzPopconfirmVisible] |
Show or hide popconfirm | boolean |
false |
[nzPopconfirmShowArrow] |
Whether popconfirm has arrow | boolean |
true |
(nzPopconfirmVisibleChange) |
Callback of hide or show | EventEmitter<boolean> |
- |
[nzPopconfirmMouseEnterDelay] |
Delay in seconds, before popconfirm is shown on mouse enter | number |
0.15 |
[nzPopconfirmMouseLeaveDelay] |
Delay in seconds, before popconfirm is hidden on mouse leave | number |
0.1 |
[nzPopconfirmOverlayClassName] |
Class name of the popconfirm card | string |
- |
[nzPopconfirmOverlayStyle] |
Style of the popconfirm card | object |
- |
[nzPopconfirmBackdrop] |
whether or not the overlay should attach a backdrop | boolean |
false |
Param | Description | Type | Default value | Global Config |
---|---|---|---|---|
[nzCancelText] |
Text of the Cancel button | string |
'Cancel' |
- |
[nzOkText] |
Text of the Confirm button | string |
'Confirm' |
- |
[nzOkType] |
Button type of the Confirm button |
'primary' | 'ghost' | 'dashed' | 'danger' | 'default' |
'primary' |
- |
[nzOkDanger] |
Danger status of the OK button. Consistent with the nzDanger of the nz-button . |
boolean |
false |
- |
[nzCondition] |
Whether to directly emit onConfirm without showing Popconfirm |
boolean |
false |
- |
[nzIcon] |
Customize icon of confirmation | string | TemplateRef<void> |
- | - |
[nzAutoFocus] |
Autofocus a button | null | 'ok' | 'cancel' |
null |
✅ |
[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 |
- |
(nzOnCancel) |
Callback of cancel | EventEmitter<void> |
- | - |
(nzOnConfirm) |
Callback of confirmation | EventEmitter<void> |
- | - |
Consult Tooltip's documentation to find more APIs.
Please ensure that the node of [nz-popconfirm]
accepts onMouseEnter
, onMouseLeave
, onFocus
, onClick
events.