fix: Select width getting smaller when search (#41722)

* bump rc-select

* fix: Select width become 0px when searching
This commit is contained in:
afc163 2023-04-10 13:11:51 +08:00 committed by GitHub
parent 4b2c5ded8d
commit 0eed438d76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2 additions and 5 deletions

View File

@ -7771,7 +7771,6 @@ exports[`renders components/select/demo/responsive.tsx extend context correctly
exports[`renders components/select/demo/search.tsx extend context correctly 1`] = `
<div
class="ant-select ant-select-single ant-select-show-arrow ant-select-show-search"
style="width: 160px;"
>
<div
class="ant-select-selector"

View File

@ -2351,7 +2351,6 @@ exports[`renders components/select/demo/responsive.tsx correctly 1`] = `
exports[`renders components/select/demo/search.tsx correctly 1`] = `
<div
class="ant-select ant-select-single ant-select-show-arrow ant-select-show-search"
style="width:160px"
>
<div
class="ant-select-selector"

View File

@ -12,7 +12,6 @@ const onSearch = (value: string) => {
const App: React.FC = () => (
<Select
showSearch
style={{ width: 160 }}
placeholder="Select a person"
optionFilterProp="children"
onChange={onChange}

View File

@ -41,7 +41,7 @@ function genSizeStyle(token: SelectToken, suffix?: string): CSSObject {
`]: {
padding: 0,
lineHeight: `${selectHeightWithoutBorder}px`,
transition: `all ${token.motionDurationSlow}`,
transition: `all ${token.motionDurationSlow}, visibility 0s`,
// Firefox inline-block position calculation is not same as Chrome & Safari. Patch this:
'@supports (-moz-appearance: meterbar)': {

View File

@ -140,7 +140,7 @@
"rc-rate": "~2.10.0",
"rc-resize-observer": "^1.2.0",
"rc-segmented": "~2.1.2",
"rc-select": "~14.4.0",
"rc-select": "~14.4.3",
"rc-slider": "~10.1.0",
"rc-steps": "~6.0.0",
"rc-switch": "~4.0.0",