MacOS反应生态选择器/选择搜索字段
我在 macOS 上使用 @react-native-picker/picker
来选择 picker/select
中的项目。
但从图形上看它不是很好,我想要实现的是类似的效果如下图或适合 macOS 图形的东西。 可以在文本旁边放置一个图标,这是一个允许您过滤结果的输入字段。
你能给我一些建议吗?
I am using @react-native-picker/picker
on macOS to select items in a picker/select
.
But graphically it's not very nice, what I would like to achieve is an effect similar to the one in the image below or something that suits the graphics of macos.
With the possibility of putting an icon next to the text, an input field that allows you to filter the results.
Can you give me some advice?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这将取决于库允许定制的内容。然而,如果没有包,这并不难实现。本质上,您希望将文本字段与平面列表结合起来,并使用文本字段中的输入来过滤平面列表中的数据。然后,您还可以根据平面列表中选择的项目自定义文本字段中的文本。
如果您有任何疑问,请告诉我。
It would depend on what the library allows customization wise. However, this isn't very hard to accomplish without a package. Essentially you want to combine a text field with a flat list and use the input from the text field to filter the data in the flat list. You can then also customize the text in the text field based on what item is selected in the flat list.
Let me know if you have any questions.