shelcia / mocker

Mocker can generate mock data with API endpoints, powered by faker.js
https://mocker-gen.netlify.app/
GNU General Public License v3.0
17 stars 29 forks source link

Group Fields in adding resource dropdown #23

Closed shelcia closed 1 year ago

shelcia commented 1 year ago

Tech ref: https://mui.com/material-ui/react-select/#grouping

Grouping ref: https://fakerjs.dev/api/

Screenshot 2022-12-06 at 3 33 56 AM

shelcia commented 1 year ago
     <FormControl sx={{ m: 1, minWidth: 120 }}>
        <InputLabel htmlFor="grouped-select">Grouping</InputLabel>
        <Select defaultValue="" id="grouped-select" label="Grouping">
          <MenuItem value="">
            <em>None</em>
          </MenuItem>
          <ListSubheader>Category 1</ListSubheader>
          <MenuItem value={1}>Option 1</MenuItem>
          <MenuItem value={2}>Option 2</MenuItem>
          <ListSubheader>Category 2</ListSubheader>
          <MenuItem value={3}>Option 3</MenuItem>
          <MenuItem value={4}>Option 4</MenuItem>
        </Select>
      </FormControl>
AbhiPatel10 commented 1 year ago

Need more clarification on this issue.

shelcia commented 1 year ago

There is a way to group the fields through MUI https://mui.com/material-ui/react-select/#grouping

The grouping needs to be done based on https://fakerjs.dev/api/. (category wise)

abdullahranginwala commented 1 year ago

@AbhiPatel10 Are you working on this? If not, I'd love to take this up

AbhiPatel10 commented 1 year ago

Go for it, @shelcia Please assign this issue to @abdullahranginwala

abdullahranginwala commented 1 year ago

Thank you!

MCoder86A commented 1 year ago

@shelcia Can you add codepeak22 label in this issue