Skip to content

ChipField: Respect parent form Disabled and ReadOnly state - #653

Merged
mckaragoz merged 2 commits into
CodeBeamOrg:devfrom
redgp0g:fix/issue-270-chip-field-on-form-disabled
Nov 3, 2026
Merged

mckaragoz merged 2 commits into
CodeBeamOrg:devfrom
redgp0g:fix/issue-270-chip-field-on-form-disabled

Conversation

@redgp0g

@redgp0g redgp0g commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Chips used the component's own Disabled parameter, and Closed() checked Disabled/ReadOnly directly, so chips stayed enabled and removable inside a read-only MudForm (I don't know exactly why, but in the disabled MudForm was working in my test). So I changed to GetDisabledState() and GetReadOnlyState() so the cascaded form state is honored.

Fixes #270

Before:

Gravacao.de.Tela.2026-11-01.203646.mp4

After:

Gravacao.de.Tela.2026-11-01.203939.mp4

Chips used the component's own Disabled parameter, and Closed() checked
Disabled/ReadOnly directly, so chips stayed enabled and removable inside
a disabled or read-only MudForm. Use GetDisabledState() and
GetReadOnlyState() so the cascaded form state is honored.

Fixes CodeBeamOrg#270

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.29%. Comparing base (b1e5a3f) to head (0cfc2ea).
⚠️ Report is 2 commits behind head on dev.

Files with missing lines Patch % Lines
...ensions/Components/ChipField/MudChipField.razor.cs 0.00% 1 Missing and 2 partials ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #653      +/-   ##
==========================================
- Coverage   67.30%   67.29%   -0.01%     
==========================================
  Files         117      117              
  Lines        8487     8556      +69     
  Branches     1498     1508      +10     
==========================================
+ Hits         5712     5758      +46     
- Misses       2243     2258      +15     
- Partials      532      540       +8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mckaragoz
mckaragoz merged commit 8be87d4 into CodeBeamOrg:dev Nov 3, 2026
2 of 3 checks passed
@mckaragoz

Copy link
Copy Markdown
Contributor

Thanks 🥇

@redgp0g
redgp0g deleted the fix/issue-270-chip-field-on-form-disabled branch November 4, 2026 10:01
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.

MudChipField does not respect MudForm.Disabled

2 participants