jeudi 19 août 2021

Is there a way to add multiselect (selection with checkboxes) in MUI Datatable FilterOptions

I would like to be able to use checboxes for multiselect in the drop down filter. Natively it seems to do it (defaults), I suspect it picks up from the Columns or Data api.

But in the following scenario, not.

columns = 
  {"id":"68","sequence":55,"name":"students",                                  
   "label":"Students",
   "className":"students",
   "options":
   {
      "sort":true,"filter":true,"searchable":false,"sortThirdClickReset":true,
      "filterType":"dropdown",
      "filterOptions":
      {"names":
   ["Bob","Shirley","James","Craig","Fred","Steve","Ian"] 
}

}

and:

 return (
    <div>
        <MuiThemeProvider theme={getMuiTheme}>
            <MUIDataTable
                title={props.title}
                data={rows}
                columns={columns}
                options={options}
            />
        </MuiThemeProvider>
    </div>
)

Thx




Aucun commentaire:

Enregistrer un commentaire