Skip to content

Commit 42b3f52

Browse files
crisbetoandrewseguin
authored andcommitted
refactor(dialog): allow matDialogClose on non-button nodes (#16603)
Loosens up the selector on `MatDialogClose` so that it can be added on everything, not just buttons. Fixes #16597.
1 parent 197091c commit 42b3f52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/material/dialog/dialog-content-directives.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ let dialogElementUid = 0;
2525
* Button that will close the current dialog.
2626
*/
2727
@Directive({
28-
selector: `button[mat-dialog-close], button[matDialogClose]`,
28+
selector: '[mat-dialog-close], [matDialogClose]',
2929
exportAs: 'matDialogClose',
3030
host: {
3131
'(click)': 'dialogRef.close(dialogResult)',

0 commit comments

Comments
 (0)