Skip to content

fix(material/chips): hide input placeholder when chip grid is disabled#32979

Closed
yogeshwaran-c wants to merge 1 commit intoangular:mainfrom
yogeshwaran-c:fix/chips-disabled-placeholder
Closed

fix(material/chips): hide input placeholder when chip grid is disabled#32979
yogeshwaran-c wants to merge 1 commit intoangular:mainfrom
yogeshwaran-c:fix/chips-disabled-placeholder

Conversation

@yogeshwaran-c
Copy link
Contributor

Summary

  • Hides the input placeholder text when the chip grid is disabled
  • When a mat-chip-grid is disabled, the associated matChipInput now removes its placeholder attribute, preventing misleading placeholder text on a non-interactive input

Changes

  • Updated chip-input.ts host binding: [attr.placeholder] now checks the disabled state before rendering the placeholder

Test plan

  • Verify placeholder is visible when chip grid is enabled
  • Verify placeholder is hidden when chip grid is disabled
  • Run pnpm test chips to confirm existing tests pass

🤖 Generated with Claude Code

The chip input was showing its placeholder text even when the chip grid
was disabled, which is confusing because it implies the control is still
interactive. In v19 the placeholder was hidden when disabled, so this
is a regression.

The fix suppresses the placeholder attribute binding when the input is
disabled (either directly or through the parent chip grid).

Fixes angular#32849
@pullapprove pullapprove bot requested review from crisbeto and tjshiu March 25, 2026 12:19
@crisbeto
Copy link
Member

It's currently working as expected.

@crisbeto crisbeto closed this Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants