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

InputNumber在输入框输入超出min/max的数字,不会触发onOverLimit,且onChange入参和输入框展示数字不一致 #2501

Closed
alexxyzeng opened this issue Jul 30, 2024 · 0 comments

Comments

@alexxyzeng
Copy link
Contributor

NutUI React 包名

@nutui/nutui-react-taro

NutUI React 版本号

2.3.11

平台

weapp

重现链接

https://codesandbox.io/p/devbox/practical-tereshkova-82jskr

重现步骤

  1. 设置一个InputNumber的min为1和max为20
  2. 在输入框内输入20,不会触发onOverLimit
  3. 在输入框内输入20时,onChange回调入参为20,失去焦点时,输入框展示10

期望的结果是什么?

  1. 在输入框输入超出min或者max的数字时,能够触发onOverLimit
  2. onChange入参和输入框展示一致

实际的结果是什么?

  1. 在输入框输入超出min或者max的数字时,不会触发onOverLimit
  2. 在输入框输入超出min或者max的数字时,输入框失去焦点后会将展示的数字限制在min和max的范围内,onChange会带出实际输入的数字,onChange回调入参和实际展示不一致

环境信息

No response

其他补充信息

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants