ant-design / ant-design/compatible

表单 select 搜索输入时,select框会往下掉

Open
#49 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
93
Forks
29
PR merge metrics
No merged PRs in 30d

Description

未输入内容时:
![image](https://user-images.githubusercontent.com/11470599/83939198-95d49680-a80d-11ea-9049-5e3ee7bfa51f.png)

输入内容:
![image](https://user-images.githubusercontent.com/11470599/83939209-b8ff4600-a80d-11ea-89a5-0ed24b5e4691.png)

直接删掉 `ant-select-selection-placeholder` 节点也可以复现

猜测原因:输入内容后,`ant-select-selection-placeholder` 的节点删掉了,没有文字内容支撑,line-height 无法生效,导致 select 框往下掉

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the form select behavior in the two screenshots, comparing the empty search state with the state after input. Inspect the ant-select-selection-placeholder node and the select's layout when that node is removed. Done means the select box no longer shifts downward while searching, including when the placeholder node has no text.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.