Skip to content

Commit 06a26ad

Browse files
docs(material/form-field): Use BooleanInput for required and disabled attributes (#27139)
1 parent 7c48a36 commit 06a26ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

guides/creating-a-custom-form-field-control.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ change detection if the required state changes.
300300
get required() {
301301
return this._required;
302302
}
303-
set required(req) {
303+
set required(req: BooleanInput) {
304304
this._required = coerceBooleanProperty(req);
305305
this.stateChanges.next();
306306
}
@@ -316,7 +316,7 @@ make up our component.
316316
```ts
317317
@Input()
318318
get disabled(): boolean { return this._disabled; }
319-
set disabled(value: boolean) {
319+
set disabled(value: BooleanInput) {
320320
this._disabled = coerceBooleanProperty(value);
321321
this._disabled ? this.parts.disable() : this.parts.enable();
322322
this.stateChanges.next();

0 commit comments

Comments
 (0)