I’m trying to create a cascading select to define a category of a file
const categories = ["a", "b", "c", "d"];
<InputLabel id="category">Category</InputLabel>
<Select
labelId="category"
id="category"
value={category}
label="Category"
onChange={handleChange}
fullWidth
>
{categories.map((item) => (
<MenuItem value={item} key={item}>
{item}
</MenuItem>
))}
</Select>
<FileUpload setFileNames={setFileNames} setFiles={setFiles} />
I would like to add more levelsmenus that appear when a value of the first menu is clicked and then categorize the file.
first i’m trying to create the multilevel menu.
could you give me some advice?
2
Answers
Below is basic layout where the next menu shows up based on the category selected but found this for better styled menu:
https://mui-nested-menu.vercel.app/nested-dropdown