Skip to content

Commit bf8822b

Browse files
Copilotafc163
andauthored
fix: TreeSelect selected value visible when searching (ant-design#56946)
* Initial plan * Fix TreeSelect selected value visibility when searching - Fixed CSS specificity issue where .ant-select-open .ant-select-content was overriding the transparent color - Added nested rule for has-search-value within open state to ensure selected text is hidden during search - Added test case to verify the fix Co-authored-by: afc163 <507615+afc163@users.noreply.github.com> * Add test for Select component search value hiding - Added test case to ensure Select component also properly hides selected value when searching - Verified fix works for both Select and TreeSelect components Co-authored-by: afc163 <507615+afc163@users.noreply.github.com> * Fix code formatting per Biome requirements - Simplified JSX formatting in test files - All linting checks pass - Tests still passing Co-authored-by: afc163 <507615+afc163@users.noreply.github.com> * Remove test cases per feedback - Removed "should hide selected value when searching" test from Select - Removed "should hide selected value when searching" test from TreeSelect - CSS fix in select-input.ts remains (the actual fix) Co-authored-by: afc163 <507615+afc163@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: afc163 <507615+afc163@users.noreply.github.com> Co-authored-by: afc163 <afc163@gmail.com>
1 parent 5a07a38 commit bf8822b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

components/select/style/select-input.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,10 @@ const genSelectInputStyle: GenerateStyle<SelectToken> = (token) => {
297297

298298
[`&${componentCls}-open ${componentCls}-content`]: {
299299
color: token.colorTextPlaceholder,
300+
301+
'&-has-search-value': {
302+
color: 'transparent',
303+
},
300304
},
301305
},
302306
},

0 commit comments

Comments
 (0)