mui-datatables icon indicating copy to clipboard operation
mui-datatables copied to clipboard

Getting `displayData` outside of `MUIDataTable`

Open LEv145 opened this issue 1 year ago • 0 comments

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

LEv145 avatar Mar 05 '23 14:03 LEv145