ant-design / ant-design

An enterprise-class UI design language and React UI library
https://ant.design
MIT License
91.89k stars 48.82k forks source link

【Select】select组件的showSearch功能在mode是否为multiple时下拉选项表现不一致 #50642

Open xiaogeneral opened 2 weeks ago

xiaogeneral commented 2 weeks ago

What problem does this feature solve?

当mode= multiple时 1: 进行sug 2: 失去焦点 3:聚焦,不会请求sug接口 当mode为单选时步骤3会再次请求sug接口

What does the proposed API look like?

希望步骤3的行为表现一致,都不再请求sug接口

github-actions[bot] commented 2 weeks ago

Hello @xiaogeneral. Please provide a online reproduction by forking this one or provide a minimal GitHub repository like create-react-app-antd. Issues labeled by Need Reproduce will be closed if no activities in 3 days.

你好 @xiaogeneral,我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过 fork 这个在线重现案例 ,或者提供一个最小化的 GitHub 仓库(类似 create-react-app-antd)。3 天内未跟进此 issue 将会被自动关闭。

什么是最小化重现,为什么这是必需的?

afc163 commented 2 weeks ago

反馈 bug 请用 bug report 的模板,而不是 feature request 的模板。

xiaogeneral commented 2 weeks ago

不确定这是个bug还是feature

xiaogeneral commented 2 weeks ago

复现demo https://codesandbox.io/p/sandbox/sou-suo-yong-hu-antd-4-24-16-forked-9sp7lp?file=%2Fdemo.tsx%3A96%2C19

afc163 commented 2 weeks ago

表现不一致

你表达的方式看上去认为是一个 bug。

afc163 commented 2 weeks ago

录个屏看看?我按你给的步骤操作好像没能重现出你描述的问题。

xiaogeneral commented 2 weeks ago

https://github.com/user-attachments/assets/d00913fa-43c9-41c3-b3ba-4967d22a7d43

xiaogeneral commented 2 weeks ago

录个屏看看?我按你给的步骤操作好像没能重现出你描述的问题。

录屏在上面了

xiaogeneral commented 1 week ago

这个问题有跟进吗

MadCcc commented 1 week ago

multiple 下清空时少触发了一次

xiaogeneral commented 1 week ago

multiple 下清空时少触发了一次

这种交互是不是更合理些,毕竟用户搜索后失焦->聚焦,这时下拉显示刚刚搜索的结果更符合人的直观