projects/ui-kit-lib/src/lib/v2/modals/dialog-content-directives.ts
Button-like directive that closes the nearest dialog when clicked.
Usage:
_closeDialogVia with an interaction origin ('mouse' or 'keyboard')
so the focus can be restored appropriately.
| Selector | [md-dialog-close], [mdDialogClose] |
| exportAs | mdDialogClose |
Properties |
Methods |
Inputs |
constructor()
|
| aria-label |
Type : string
|
|
Optional aria-label for the closing button. |
| md-dialog-close |
Type : any
|
|
Preferred input for a close result (dash-cased attribute). |
| mdDialogClose |
Type : any
|
|
CamelCased alias of the same input (kept for API parity & template style). |
| type |
Type : "submit" | "button" | "reset"
|
Default value : 'button'
|
|
Native button type; defaults to "button" to avoid accidental form submit. |
| _onButtonClick | ||||||
_onButtonClick(event: MouseEvent)
|
||||||
|
Click handler: close the dialog and tag the interaction origin for focus restoration.
Parameters :
Returns :
void
|
| dialogRef |
Type : unknown
|
Default value : inject<MefDevDialogRef<any>>(MefDevDialogRef, {optional: true})!
|
|
Injected dialog ref when available (undefined if used outside projected dialog content). |