Skip to content

Commit 7b42c7e

Browse files
authored
fix(material-experimental/form-field): add setLabelRequired adapter (#19284)
1 parent ba521d2 commit 7b42c7e

File tree

3 files changed

+535
-529
lines changed

3 files changed

+535
-529
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"@types/youtube": "^0.0.38",
6060
"@webcomponents/custom-elements": "^1.1.0",
6161
"core-js": "^2.6.9",
62-
"material-components-web": "7.0.0-canary.af71cfdd6.0",
62+
"material-components-web": "7.0.0-canary.047e6b337.0",
6363
"rxjs": "^6.5.3",
6464
"systemjs": "0.19.43",
6565
"tslib": "^1.10.0",

src/material-experimental/mdc-form-field/form-field.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,11 @@ export class MatFormField implements AfterViewInit, OnDestroy, AfterContentCheck
243243
// have the ability to control the floating label state (i.e. `shouldLabelFloat`), and we
244244
// want to update the notch whenever the `_shouldLabelFloat()` value changes.
245245
getLabelWidth: () => 0,
246+
247+
// TODO: MDC now supports setting the required asterisk marker directly on
248+
// the label component. This adapter method may be implemented and
249+
// mat-mdc-form-field-required-marker removed.
250+
setLabelRequired: () => {},
246251
notchOutline: () => {},
247252
closeOutline: () => {},
248253

0 commit comments

Comments
 (0)