fix(combo,select): reset to INITIAL state on control.disable() when touched/dirty#17262
Merged
Conversation
…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.
Contributor
There was a problem hiding this comment.
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
INITIALwhen 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. |
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>
wnvko
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #17234
Replace
!this.disabledwith!this.ngControl.disabled, which reflects the live control status and is alreadytrueat the timestatusChangesemits. This matches the pattern used by IgxTimePicker and IgxDateRangePicker.Type of Change (check all that apply):
How Has This Been Tested?
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)