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

🐛 [Bug]: Picker 组件在通过 form.setFieldValue 设置 value 的问题 #702

Closed
1 of 2 tasks
tianxing0923 opened this issue Feb 26, 2024 · 0 comments
Closed
1 of 2 tasks
Labels
🙇 help wanted Extra attention is needed 🙋 pr welcome Welcome pr for this feature!

Comments

@tianxing0923
Copy link
Contributor

Which React Vant packages are impacted?

  • react-vant (React Vant core)
  • react-vant-icons(React Vant Icon)

What version of React Vant are you using?

3.3.3

Reproduce live demo(codesandebox or stackblitz)?

https://codesandbox.io/p/sandbox/biao-dan-xiang-lei-xing-forked-d83gzc?file=%2FApp.tsx%3A9%2C12

Descripition

Picker 组件在表单中通过 form.setFieldValue 设置 value 后,在 chrome 下正常,但在 ios safari、微信webview 和 mac safari 内第一次弹出的时候没有选中,关闭后第二次弹出才选中,经过调试发现是 PickerInner 内的 useDebounceEffect 导致,把 wait 设置大一点时没有问题,怀疑是 debounce 内的 setTimeout 浏览器差异所致

测试版本:
mac: macOS Monterey (12.1) M1
ios: 17.3.1
safari: 15.2 (17612.3.6.1.6)
chrome: 121.0.6167.184 (arm64)

@3lang3 3lang3 added 🙇 help wanted Extra attention is needed 🙋 pr welcome Welcome pr for this feature! labels Feb 26, 2024
@3lang3 3lang3 closed this as completed in e3c1b4f Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙇 help wanted Extra attention is needed 🙋 pr welcome Welcome pr for this feature!
Projects
None yet
Development

No branches or pull requests

2 participants