fix(cacheView): replace datalist+input with select for enum cache entries#4973
Open
St0fF-NPL-ToM wants to merge 1 commit into
Open
fix(cacheView): replace datalist+input with select for enum cache entries#4973St0fF-NPL-ToM wants to merge 1 commit into
St0fF-NPL-ToM wants to merge 1 commit into
Conversation
…ries The previous implementation used <datalist> + <input type="text"> for cache entries with a fixed set of choices (STRINGS property). The browser filters datalist suggestions based on the current input value, making it impossible to see all available options without first clearing the field. Replace with a proper <select> element when choices are present: - shows all options unfiltered when opened - current value is pre-selected via the 'selected' attribute - a separate .cmake-input-select class and oninput handler handles change events Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Problem
Cache entries with a fixed set of choices (defined via CMake's
STRINGSproperty) were rendered as<datalist>+<input type="text">. The browser automatically filters datalist suggestions based on the current input value — so opening the dropdown only shows options matching what is already typed. Without clearing the field first, it is impossible to see all available choices.Fix
Replace
<datalist>+<input type="text">with a<select>element whenchoicesare present:selectedattribute.cmake-input-selectCSS class andoninputhandler covers change eventsWhen no choices are present, the
<input type="text">is used as before.Test
STRINGSchoices (e.g.CMAKE_BUILD_TYPEwithDebug;Release;RelWithDebInfo;MinSizeRel)cmake.editCacheUI)🤖 Generated with Claude Code