mui-datatables
mui-datatables copied to clipboard
Getting `displayData` outside of `MUIDataTable`
Difficult to work with displayData outside of customToolbar or MUIDataTable when customBodyRender is FormControlLabel
Expected Behavior
Easily get displayData at any given time
I think it would be more convenient to give the opportunity to pass state displayData to MUIDataTable
Current Behavior
I need to calculate displayData in customBodyRender in columns
Steps to Reproduce
export default function CustomBodyRender({
value,
tableMeta,
updateValue,
setDisplayData, // To change displayData when changing a column
}: any) {
return <FormControlLabel
label=""
control={<TextField value={value} />}
onChange={
(event) => {
updateValue((event.target as HTMLInputElement).value)
// setDisplayData here
}
}
/>
}
Your Environment
| Tech | Version |
|---|---|
| Material-UI | 5.11.1 |
| MUI-datatables | 4.3.3 |
| React | 11.10.6 |
| browser | Firefox |