GridToolbarExport from Material UI stop to work after last version? 5.0.0-alpha.37

Viewed 394

I'm create a custom toolbar for my Data Grid with the following structure :

  return (
    <GridToolbarContainer>
      <GridToolbarColumnsButton />
      <GridToolbarFilterButton />
      <GridToolbarDensitySelector />
      <GridToolbarExport />
    </GridToolbarContainer>
  );

All the components work normally but the GridToolbarExport is now telling this :

error from typescript

i updated my version to this one :

"@material-ui/core": "^5.0.0-alpha.37", "@material-ui/data-grid": "^4.0.0-alpha.32",

am i missing something ? thanks!

1 Answers

I upgraded to Material-UI v5 and ran into this issue as well. I managed to get it working by passing in "props: any". I'm still not sure the correct type Module Augmentation to get this going for Typescript. Additional help would be great.

function CustomToolbar(props: any) {
  return (
    <GridToolbarContainer>
      <GridToolbarColumnsButton />
      <GridToolbarFilterButton {...props} />
      <GridToolbarDensitySelector />
      <GridToolbarExport {...props} />
    </GridToolbarContainer>
  );
}
Related