team-monite / monite-sdk

Monite SDK: Embed invoicing and payables into your app
https://docs.monite.com
MIT License
15 stars 9 forks source link

fix(DEV-12155): fix Amount field being clipped in Receivables / Payables data grids #222

Closed chebum closed 3 months ago

chebum commented 3 months ago

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.

changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: 1e4ca38361912141d5b9d67918585cff9aed175d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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