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

[TimePicker] 提供一个事件,由组件弹出层的确定按钮触发,并传递选中的值 #811

Closed
Crazymuyang opened this issue May 18, 2022 · 4 comments
Labels
💪🏻 enhancement New feature or request to be published to be published

Comments

@Crazymuyang
Copy link

这个功能解决了什么问题

目前 TimePicker 的 确定 按钮只是关闭的作用,有必要有一个类似的功能 表达选择已确认,方便在事件中做一些后续业务逻辑;

并且 onChange 事件在打开 picker 时会被多次触发(应该是 h/m/s 各自抛出了 change 导致?),且每一个数值的变化都会触发 change,导致它并不是一个实现上述需求的好选择,不知道是否是 bug;

你建议的方案是什么

简单粗暴一点,给【确定】按钮加一个 confirm 事件应该很简单;
初次打开 picker 直接自动选中 当前时段,在很多场景下会让这个组件很难用,不如去掉,或者加参数关闭这个功能;

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

♥️ 有劳 @xkelvinx666 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @Crazymuyang

@uyarn
Copy link
Collaborator

uyarn commented May 18, 2022

这个组件和datepicker下个月会重构 交互会改成点击确认才保留修改

@uyarn uyarn added the 💪🏻 enhancement New feature or request label May 18, 2022
@PengYYYYY PengYYYYY added the to be published to be published label Jun 13, 2022
@PengYYYYY
Copy link
Collaborator

0.16.0 已修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪🏻 enhancement New feature or request to be published to be published
Projects
None yet
Development

No branches or pull requests

3 participants