Skip to content

fix(combo,select): reset to INITIAL state on control.disable() when touched/dirty#17262

Merged
simeonoff merged 5 commits into
masterfrom
simeonoff/fix-17234
May 11, 2026
Merged

fix(combo,select): reset to INITIAL state on control.disable() when touched/dirty#17262
simeonoff merged 5 commits into
masterfrom
simeonoff/fix-17234

Conversation

@simeonoff
Copy link
Copy Markdown
Collaborator

Closes #17234

Replace !this.disabled with !this.ngControl.disabled, which reflects the live control status and is already true at the time statusChanges emits. This matches the pattern used by IgxTimePicker and IgxDateRangePicker.

Type of Change (check all that apply):

  • Bug fix
  • New functionality
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation
  • Demos
  • CI/CD
  • Tests
  • Changelog
  • Skills/Agents

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them
  • Accessibility (ARIA, keyboard navigation, focus management) has been verified

…ouched/dirty

Closes #17234

Replace `!this.disabled` with `!this.ngControl.disabled`, which reflects
the live control status and is already `true` at the time
`statusChanges` emits. This matches the pattern used by IgxTimePicker
and IgxDateRangePicker.
Comment thread projects/igniteui-angular/combo/src/combo/combo.component.spec.ts Fixed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a forms integration bug where IgxCombo/IgxSimpleCombo/IgxSelect could incorrectly render an INVALID visual state after the bound FormControl is disabled while touched/dirty. The fix aligns these components with existing patterns used in other Ignite UI form controls by relying on the live reactive-forms disabled state (ngControl.disabled) during statusChanges.

Changes:

  • Update status-change handling to use !ngControl.disabled (instead of !this.disabled) when deciding whether to compute INVALID/VALID visual states.
  • Add unit tests covering the “previously invalid + then disabled” and “touched/dirty + then disabled” scenarios for Combo and SimpleCombo.
  • Add a unit test verifying Select resets to INITIAL when disabling an already-invalid touched control.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
projects/igniteui-angular/simple-combo/src/simple-combo/simple-combo.component.spec.ts Adds regression tests ensuring SimpleCombo renders INITIAL after disabling a touched/dirty or previously invalid control.
projects/igniteui-angular/select/src/select/select.component.ts Fixes status handling by checking ngControl.disabled (live control state) to avoid rendering INVALID when the control becomes disabled.
projects/igniteui-angular/select/src/select/select.component.spec.ts Adds regression test verifying Select resets to INITIAL after disabling a previously invalid touched control.
projects/igniteui-angular/combo/src/combo/combo.component.spec.ts Adds regression tests ensuring Combo renders INITIAL after disabling a touched/dirty or previously invalid control.
projects/igniteui-angular/combo/src/combo/combo.common.ts Fixes shared Combo base status handling by using ngControl.disabled to avoid transient INVALID state on disable.

simeonoff and others added 4 commits May 8, 2026 10:29
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@simeonoff simeonoff assigned adrianptrv and unassigned adrianptrv May 11, 2026
@simeonoff simeonoff merged commit 93cf295 into master May 11, 2026
6 checks passed
@simeonoff simeonoff deleted the simeonoff/fix-17234 branch May 11, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SimpleCombo/Combo shows invalid state after disabling a touched form control

4 participants