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

usePropsValue对于undefined处理问题 #2606

Open
TSjianjiao opened this issue Sep 20, 2024 · 0 comments
Open

usePropsValue对于undefined处理问题 #2606

TSjianjiao opened this issue Sep 20, 2024 · 0 comments

Comments

@TSjianjiao
Copy link

NutUI React 包名

@nutui/nutui-react

NutUI React 版本号

2.6.18"

平台

weapp

重现链接

https://codesandbox.io/p/devbox/6pmvnn

重现步骤

  1. 随便填写一些值进入输入框
  2. 点击填充值
  3. 出现校验错误

期望的结果是什么?

输入框清空

实际的结果是什么?

实际form的store值是设置为undefined,但是控件内部的value没有被清空

环境信息

No response

其他补充信息

usePropsValue的源码中没有对undefined做操作,换成ahooksuseControllableValue就没有这个问题

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

No branches or pull requests

1 participant