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

[NumberPicker]NumberPicker 组件bug #4961

Closed
1119879311 opened this issue Nov 6, 2024 · 2 comments
Closed

[NumberPicker]NumberPicker 组件bug #4961

1119879311 opened this issue Nov 6, 2024 · 2 comments
Labels
💬 Discussion Stale not active for a lone time

Comments

@1119879311
Copy link

Component

NumberPicker

Reproduction link

https://fusion.design/pc/component/number-picker?themeid=2#limit-container

Steps to reproduce

数字组件的最大值和最小值的限制bug
背景:最大值的修正时机是在onChage 事件,并且能回调onChange事件是正确的
问题:

  1. 最小值的修正时机却是在失去焦点事件,这是不正确的
  2. 在不停的输入过程中,低于最小值的限制,没有像最大值一样自动修正最小值,还可以不停的输入低于最小值,这是不正确的
  3. 当超出最小值限制,就不会触发onChang 事件,这也是不正确的,要不在输入过程中要立即修正最小值,并且能回调onChange 事件
@zyliang96
Copy link
Contributor

其中有些中间输入状态无法触发 onChange,主要考虑到自动订正可能永远无法到达想要的值了。例如:

0=>0.=>0.0=>0.01 中间两步不会触发 onChange,因为如果订正会一直停留在 0 导致永远无法到达想要的值
min=10 的情况下,输入 1=>12 第一步 1 不会触发 onChange 也不会订正数据,因为数字是一个一个输入的

@zyliang96 zyliang96 added the invalid This doesn't seem right label Dec 6, 2024
@zyliang96 zyliang96 added 💬 Discussion and removed invalid This doesn't seem right labels Dec 19, 2024
Copy link

你好,该 issue 已 30 天没有活动,因此被标记为 stale,如果之后的 7 天仍然没有活动,该 issue 将被自动关闭

@github-actions github-actions bot added the Stale not active for a lone time label Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💬 Discussion Stale not active for a lone time
Projects
None yet
Development

No branches or pull requests

2 participants