Skip to content
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

修复input-text组件 autoComplete、creatable属性导致弹框不消失的bug #10972

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lhtuling
Copy link

input-text组件使用autoComplete属性时 点击了选项 选项组弹框不消失 需要点击空白处才能消失
然后发现 creatable: false 也会同样导致这个bug

(event.target as HTMLElement).tagName.toLowerCase() === 'input'

这个修改的方式可能不太规范,因为不太了解整个项目,不知道怎么判断点击的是选项还是文本框本身,大佬可以指点一下

What

Why

How

input-text组件使用autoComplete属性时 点击了选项 选项组弹框不消失 需要点击空白处才能消失
然后发现   creatable: false 也会同样导致这个bug


``````
(event.target as HTMLElement).tagName.toLowerCase() === 'input'
``````
这个修改的方式可能不太规范,因为不太了解整个项目,不知道怎么判断点击的是选项还是文本框本身,大佬可以指点一下
Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@2betop
Copy link
Collaborator

2betop commented Sep 27, 2024

这个功能转给我吧,我觉得应该加个配置 closeOnSelect 。其他组件有实现这个,然后让单选模式自动就点选就关闭

@2betop 2betop self-assigned this Sep 27, 2024
@lhtuling
Copy link
Author

这个功能转给我吧,我觉得应该加个配置 closeOnSelect 。其他组件有实现这个,然后让单选模式自动就点选就关闭

好的修复了就好 好久的bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants