Closed x011223 closed 11 months ago
5.33.0
iOS
ios chrome 110.0
https://codesandbox.io/s/nostalgic-haze-n47jch?file=/src/App.tsx
点击 取消 的时候输入框的值被清空了,我认为取消的作用应该只是将取消按钮隐藏,SearchBar样式 恢复,清空值的操作应由清除图标完成,否则功能是有交叉的。
SearchBar
另外,预期的是 防止用户误操作点到了输入框,然后点击取消,这时候 取消操作 并保留原来的值,从这个场景看 不清空值是比较合理的,否则 输入框的值被清空之后,那么我们的数据就 需要重新进行搜索并更新页面。
No response
预设行为都可以通过受控改掉了:
https://codesandbox.io/s/broken-haze-l8zvch?file=/src/App.tsx
Version of antd-mobile
5.33.0
Operating system and its version
iOS
Browser and its version
ios chrome 110.0
Sandbox to reproduce
https://codesandbox.io/s/nostalgic-haze-n47jch?file=/src/App.tsx
What happened?
点击 取消 的时候输入框的值被清空了,我认为取消的作用应该只是将取消按钮隐藏,
SearchBar
样式 恢复,清空值的操作应由清除图标完成,否则功能是有交叉的。另外,预期的是 防止用户误操作点到了输入框,然后点击取消,这时候 取消操作 并保留原来的值,从这个场景看 不清空值是比较合理的,否则 输入框的值被清空之后,那么我们的数据就 需要重新进行搜索并更新页面。
Relevant log output
No response