fix: Select arrow disappearing when hovering it (#50382)

pull/50386/head
afc163 5 months ago committed by GitHub
parent 8c8958f0f5
commit 7bd9d54a62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -329,7 +329,7 @@ const genPaginationSimpleStyle: GenerateStyle<PaginationToken, CSSObject> = (tok
}; };
const genPaginationJumpStyle: GenerateStyle<PaginationToken, CSSObject> = (token) => { const genPaginationJumpStyle: GenerateStyle<PaginationToken, CSSObject> = (token) => {
const { componentCls, antCls } = token; const { componentCls } = token;
return { return {
[`${componentCls}-jump-prev, ${componentCls}-jump-next`]: { [`${componentCls}-jump-prev, ${componentCls}-jump-next`]: {
@ -461,11 +461,6 @@ const genPaginationJumpStyle: GenerateStyle<PaginationToken, CSSObject> = (token
'&-size-changer': { '&-size-changer': {
display: 'inline-block', display: 'inline-block',
width: 'auto', width: 'auto',
// https://github.com/ant-design/ant-design/issues/49258
[`${antCls}-select-arrow:not(:last-child)`]: {
opacity: 1,
},
}, },
'&-quick-jumper': { '&-quick-jumper': {

@ -35,6 +35,7 @@ const App: React.FC = () => (
style={{ width: 120 }} style={{ width: 120 }}
allowClear allowClear
options={[{ value: 'lucy', label: 'Lucy' }]} options={[{ value: 'lucy', label: 'Lucy' }]}
placeholder="select it"
/> />
</Space> </Space>
); );

@ -177,16 +177,9 @@ const genBaseStyle: GenerateStyle<SelectToken> = (token) => {
}, },
}, },
'&:hover': { [`&:hover ${componentCls}-clear`]: {
[`${componentCls}-clear`]: { opacity: 1,
opacity: 1, background: token.colorBgBase,
},
// Should use the following selector, but since `:has` has poor compatibility,
// we use `:not(:last-child)` instead, which may cause some problems in some cases.
// [`${componentCls}-arrow:has(+ ${componentCls}-clear)`]: {
[`${componentCls}-arrow:not(:last-child)`]: {
opacity: 0,
},
}, },
}, },

Loading…
Cancel
Save