Skip to content

Conversation

@thewatts
Copy link

@thewatts thewatts commented Oct 28, 2025

Description

This adds a new configuration option searchDisabledChoices that allows disabled choices to appear in search results while remaining non-selectable.

Previously, disabled choices were always excluded from search results via the Store's searchableChoices getter. This made it impossible for users to find disabled options even when they wanted to see what options exist but are currently unavailable.

Changes:

  • Add searchDisabledChoices option to Options interface (default: false)
  • Update Store.searchableChoices getter to respect the new config
  • Add test coverage for the new functionality
  • Maintain backward compatibility with default behavior

The selection prevention logic in _handleChoiceAction already prevents disabled choices from being selected, so they remain non-selectable even when found in search results.

Fixes the limitation where users couldn't search for disabled options to see what choices exist but are currently unavailable.

Screenshots

example.mp4

Types of changes

  • Chore (tooling change or documentation change)
  • Refactor (non-breaking change which maintains existing functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • My code follows the code style of this project.
  • I have added new tests for the bug I fixed/the new feature I added.
  • I have modified existing tests for the bug I fixed/the new feature I added.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
This adds a new configuration option `searchDisabledChoices` that allows
disabled choices to appear in search results while remaining non-selectable.

Previously, disabled choices were always excluded from search results via
the Store's searchableChoices getter. This made it impossible for users to
find disabled options even when they wanted to see what options exist but
are currently unavailable.

Changes:
- Add searchDisabledChoices option to Options interface (default: false)
- Update Store.searchableChoices getter to respect the new config
- Add test coverage for the new functionality
- Maintain backward compatibility with default behavior

The selection prevention logic in _handleChoiceAction already prevents
disabled choices from being selected, so they remain non-selectable even
when found in search results.

Fixes the limitation where users couldn't search for disabled options to
see what choices exist but are currently unavailable.
@thewatts thewatts marked this pull request as ready for review October 28, 2025 22:19
@Xon Xon added the feature Pull request that adds new functionality label Oct 30, 2025
@Xon Xon self-requested a review October 30, 2025 01:26
@Xon Xon changed the title Add searchDisabledChoices configuration option Oct 30, 2025
@Xon
Copy link
Collaborator

Xon commented Oct 30, 2025

The failing e2e test is from a random browser update and now some icons render differently, that can be ignored

Copy link
Collaborator

@Xon Xon left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Pull request that adds new functionality

2 participants