gregnb / gregnb/mui-datatables
Getting `displayData` outside of `MUIDataTable`
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 906
- PR merge metrics
- No merged PRs in 30d
Description
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
```ts
export default function CustomBodyRender({
value,
tableMeta,
updateValue,
setDisplayData, // To change displayData when changing a column
}: any) {
return }
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 |
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.