Closed chebum closed 3 months ago
Latest commit: 1e4ca38361912141d5b9d67918585cff9aed175d
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
This PR fixes Amount field being clipped in Receivables / Payables data grids. The implementation uses setTimeout for calls synchronisation due to poor API of the MUI DataGrid.
Code was adapted from https://mui.com/x/react-data-grid/column-dimensions/#autosizing-asynchronously to work with hooks and functional components.
Docs say: "The Data Grid can only autosize based on the currently rendered cells. DOM access is required to accurately calculate dimensions" Which means that autosize function should be called after DataGrid renders fully.