We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
5.33.0
Android, Others
any
https://codesandbox.io/s/wizardly-clarke-g9yvk8?file=/src/App.tsx
Dropdown.Item必须直接放在 Dropdown下作为 children 才能正常点击弹出 popup。一旦Dropdown.Item被封装成组件,渲染出来的item 点击无任何反应。影响了组件封装的灵活性。 问题复现 demo
Dropdown.Item 被封装成组件放在 Dropdown 里也可以正常使用
No response
The text was updated successfully, but these errors were encountered:
内部是通过子组件的 props 来收集信息的,HOC 后你也需要把属性写到最外层才行。
jsx 结构本身是语法糖,是不支持 HOC 的。
Sorry, something went wrong.
Dropdown.Item 的 props,是由Dropdown传下去的
套了一层相当于把它props隔离掉了,onClick自然也没设置到 Item 上
内部是通过子组件的 props 来收集信息的,HOC 后你也需要把属性写到最外层才行。 jsx 结构本身是语法糖,是不支持 HOC 的。
好嘞,谢谢解答
Dropdown.Item 的 props,是由Dropdown传下去的 套了一层相当于把它props隔离掉了,onClick自然也没设置到 Item 上
嗯嗯,后面看了代码后明白了。谢谢
No branches or pull requests
Version of antd-mobile
5.33.0
Operating system and its version
Android, Others
Browser and its version
any
Sandbox to reproduce
https://codesandbox.io/s/wizardly-clarke-g9yvk8?file=/src/App.tsx
What happened?
问题:
Dropdown.Item必须直接放在 Dropdown下作为 children 才能正常点击弹出 popup。一旦Dropdown.Item被封装成组件,渲染出来的item 点击无任何反应。影响了组件封装的灵活性。
问题复现 demo
期望的正确行为:
Dropdown.Item 被封装成组件放在 Dropdown 里也可以正常使用
Relevant log output
No response
The text was updated successfully, but these errors were encountered: