Skip to content

feat(combo): add disableClear input to IgxCombo and IgxSimpleCombo#17084

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/add-option-to-hide-clear-button
Draft

feat(combo): add disableClear input to IgxCombo and IgxSimpleCombo#17084
Copilot wants to merge 2 commits intomasterfrom
copilot/add-option-to-hide-clear-button

Conversation

Copy link
Contributor

Copilot AI commented Mar 23, 2026

The clear button on igx-combo and igx-simple-combo was always rendered with no opt-out, causing UX issues for required fields and focus-trap problems in dialogs (button remains focusable even when hidden via CSS).

Changes

  • IgxComboBaseDirective (combo.common.ts) — adds disableClear: boolean input (default false), inherited by both combo variants
  • combo.component.html / simple-combo.component.html — gates clear button rendering on !disableClear
  • Tests — 3 specs each for IgxComboComponent and IgxSimpleComboComponent covering default value, hidden state, and visible state
  • README / CHANGELOG — updated accordingly

Usage

<!-- Clear button is fully removed from the DOM when disableClear is true -->
<igx-combo [disableClear]="true" [data]="items" valueKey="id" displayKey="name"></igx-combo>
<igx-simple-combo [disableClear]="true" [data]="items" valueKey="id" displayKey="name"></igx-simple-combo>
Original prompt

This section details on the original issue you should resolve

<issue_title>SimpleCombo: add possibility to hide clear button</issue_title>
<issue_description>## Is your feature request related to a problem? Please describe.
The clear button is always visible. For specific uses cases I wish I could hide it, for example if the field is required and it doesn't make sense to clear the input.

Describe the solution you'd like

Please add a possiblity to hide the clear button.

Describe alternatives you've considered

I tried hiding it via css, but because it is still focusable (tabindex=0) there are problems when using it inside a dialog with focus trap.</issue_description>

<agent_instructions>The IgcComboComponents implements disableClear input, which should also be applied to the IgxCombos. </agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copilot AI changed the title [WIP] Add option to hide clear button in IgxCombo feat(combo): add disableClear input to IgxCombo and IgxSimpleCombo Mar 23, 2026
Copilot AI requested a review from kdinev March 23, 2026 15:58
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.

SimpleCombo: add possibility to hide clear button

2 participants