Skip to content

Commit ba9fd14

Browse files
crisbetojosephperrott
authored andcommitted
fix(popover-edit): unable to change type of popover buttons (#16058)
1 parent d463946 commit ba9fd14

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/cdk-experimental/popover-edit/lens-directives.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@
77
*/
88

99
import {ReplaySubject} from 'rxjs';
10-
import {Directive, ElementRef, EventEmitter, OnDestroy, OnInit, HostListener} from '@angular/core';
10+
import {
11+
Directive,
12+
ElementRef,
13+
EventEmitter,
14+
OnDestroy,
15+
OnInit,
16+
Input,
17+
HostListener,
18+
} from '@angular/core';
1119
import {EDIT_PANE_SELECTOR} from './constants';
1220
import {closest} from './polyfill';
1321
import {EditRef} from './edit-ref';
@@ -160,6 +168,9 @@ export class CdkEditControl<FormValue> implements OnDestroy, OnInit {
160168
}
161169
})
162170
export class CdkEditRevert<FormValue> {
171+
/** Type of the button. Defaults to `button` to avoid accident form submits. */
172+
@Input() type: string = 'button';
173+
163174
constructor(
164175
protected readonly editRef: EditRef<FormValue>) {}
165176

@@ -181,6 +192,9 @@ export class CdkEditRevert<FormValue> {
181192
}
182193
})
183194
export class CdkEditClose<FormValue> {
195+
/** Type of the button. Defaults to `button` to avoid accident form submits. */
196+
@Input() type: string = 'button';
197+
184198
constructor(
185199
protected readonly editRef: EditRef<FormValue>) {}
186200

0 commit comments

Comments
 (0)