i want to develop like this dropDown how to develop using material ui – https://mui.com/material-ui/react-select/ enter image description here
i want to develop like this drop down , how to develop it , i want to sample code this is my array
const menuData = [
{
mainItem: "FRESHWATER FISH",
mainId: "main001",
subMenu: [
{
subId: "sub001",
subItem: "Discus",
},
{
subId: "sub002",
subItem: "Gold Fish",
cateItem: [
{
cateId: "cate001",
cateItem: "Oranda Goldfish",
},
{
cateId: "cate002",
cateItem: "Black Oranda Goldfish",
},
],
},
],
},
{
mainItem: "MARINE FISH",
mainId: "main002",
},
{
mainItem: "FRESHWATER PLANTS",
mainId: "main003",
},
];
Material UI does not provide a component with that capability.
You could try something like this:
https://codesandbox.io/s/material-ui-cascader-nzc656?file=/src/demo.js
But tbh, it isn’t a very developer-friendly solution as it is.
In your place, I would check a 3rd party library like this one:
https://www.npmjs.com/package/rc-cascader?activeTab=readme