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

[Select] InputValue 改变,必定触发 popup-visible-change 事件 #4135

Closed
Cat1007 opened this issue Apr 22, 2024 · 2 comments
Closed

[Select] InputValue 改变,必定触发 popup-visible-change 事件 #4135

Cat1007 opened this issue Apr 22, 2024 · 2 comments
Labels
🐞 bug Something isn't working to be published to be published

Comments

@Cat1007
Copy link
Contributor

Cat1007 commented Apr 22, 2024

tdesign-vue-next 版本

1.9.4

重现链接

https://tdesign.tencent.com/vue-next/components/select?tab=demo#%E5%8F%AF%E8%BF%87%E6%BB%A4%E7%9A%84%E9%80%89%E6%8B%A9%E5%99%A8

重现步骤

监听 popup-visible-change 事件,输入改变必定触发,此时 popup 的可见性并没有改变

期望结果

popup 可见性是还发生变化时,才触发该事件

实际结果

input 后直接触发

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

const handlerInputChange = (value: string, context: SelectInputValueChangeContext) => {
if (value) {
setInnerPopupVisible(true, { e: context.e as KeyboardEvent });
}

留意到该段代码,无论如何都会触发一个为 true 的set事件,实际上如果当前popup已经展示,不应该再反复set进行触发

Copy link
Contributor

👋 @Cat1007,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@uyarn uyarn added the 🐞 bug Something isn't working label Apr 22, 2024
@uyarn uyarn added the to be published to be published label Apr 22, 2024
@uyarn
Copy link
Collaborator

uyarn commented May 17, 2024

fixed 1.9.5, thanks for @Liao-js

@uyarn uyarn closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working to be published to be published
Projects
None yet
Development

No branches or pull requests

2 participants