New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Select 组件 设置 showSearch 和 特定的style属性后,input光标位置异常、弹出popup行为异常 #25758
Comments
不要这样设置 line-height 样式,建议使用官方提供的 size。 |
另外,你想设置的可能是: - lineHeight: 28,
+ lineHeight: "28px", |
@afc163 你有去看codesandbox 效果么?这是一个严重的bug呢,无论怎么设置不起作用无所谓,但至少不要出现功能不可用的bug吧 |
@afc163 用户怎么设置 设置的不对,可以到不到期望的样式效果,这个可以理解,但是组件出现了功能性的障碍这个应该是组件的bug |
@BernardZhang 原因就是因为 你看现在的input框跑哪去了? |
@kermit-xuan 哦 了解了,这是一个antdv3.x时的遗留代码,在3.x的时候没有问题,用工具升级antd4.x后,无意发现这个问题的,那就是4.X针对lineHeight的处理逻辑变了导致的吧 |
只是碰巧在v3里面 lineHeight 属性没有起作用,你把版本改到v3把 lineHeight 去掉,效果不受影响。 |
Reproduction link
Steps to reproduce
import React from 'react';
import ReactDOM from 'react-dom';
import 'antd/dist/antd.css';
import { Select } from 'antd';
const { Option } = Select;
ReactDOM.render(
<Select
showSearch
style={{ minWidth: 160, height: 28, lineHeight: 28 }}
,
document.getElementById('container'),
);
What is expected?
搜索输入框位置、显示下拉popup的点击区域正常(点击Select组件区域才显示下拉)
What is actually happening?
搜索输入框位置异常、点击Select组件区域下方空白区域也显示下拉内容
The text was updated successfully, but these errors were encountered: