admin管理员组文章数量:1353132
I am a complete beginner and I am building an inventory app in react native. I came across this external library called Dropdown Picker. I managed to make it work but I just want to ask how can I include categories?
For example:
I want to have two dropdowns; one for category selection and one for specific item selection
I can't seem to comprehend what is said on the docs because it only says to include a parent property to use categories. I want something like when the first drop down (for category) is given a selection the second dropdown (for specific item) will display the category's children./
Thank you! Have a great day!
export const items = [
{ label: "Cement", value: "cement", parent: "form_works" },
{ label: "Steel Rebar", value: "steel_rebar", parent: "steel_works" },
{ label: "Coco Lumber", value: "coco_lumber", parent: "form_works" },
{ label: "Sand", value: "sand", parent: "masonry_works" },
{ label: "Gravel", value: "gravel", parent: "masonry_works" },
{ label: "Plywood", value: "plywood", parent: "form_works" },
{ label: "Concrete Mix", value: "concrete_mix", parent: "masonry_works" },
{ label: "Paint", value: "paint", parent: "architectural_works" },
{ label: "Nails", value: "nails", parent: "form_works" },
{ label: "Bricks", value: "bricks", parent: "masonry_works" },
];
本文标签: javascriptReact Native Dropdown Picker CategoryStack Overflow
版权声明:本文标题:javascript - React Native Dropdown Picker Category - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743862763a2552046.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论