Skip to content

fix(material/form-field): allow empty control properties#33372

Open
Shraddhameduri wants to merge 1 commit into
angular:mainfrom
Shraddhameduri:my-fix-branch
Open

fix(material/form-field): allow empty control properties#33372
Shraddhameduri wants to merge 1 commit into
angular:mainfrom
Shraddhameduri:my-fix-branch

Conversation

@Shraddhameduri

@Shraddhameduri Shraddhameduri commented Jun 10, 2026

Copy link
Copy Markdown

Fixes #33353

Changes

This update makes common form field properties behave more like their native HTML counterparts by allowing them to be omitted or passed as empty values.

Specifically:

  • placeholder now accepts null and undefined
  • required is now optional

The following components/interfaces were updated:

  • MatFormFieldControl
  • MatInput
  • MatChipInput
  • MatChipGrid
  • MatChipTextControl

This helps when forwarding optional inputs between components and aligns Angular Material controls more closely with native HTML input behavior.

Validation

The following tests were run successfully:

  • pnpm bazel test src/material/form-field:form-field_strict_deps_test
  • pnpm bazel test src/material/input:unit_tests
  • pnpm bazel test src/material/chips:unit_tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(MatFormFieldControl, MatInput): enable empty value for element attributes

1 participant