gregnb / gregnb/mui-datatables

Getting `displayData` outside of `MUIDataTable`

Open
#1,992 0 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.