tablelandnetwork / studio

Discover, design, deploy, and manage data driven web3 apps on Tableland.
https://studio.tableland.xyz
4 stars 1 forks source link

(web) fix DataTable re-render loop #219

Closed joewagner closed 7 months ago

joewagner commented 7 months ago

When you try to use the pagination links on the DataTable component, React is re-rendering the page endlessly because the data passed into the component is different than the formatted data.

This SO answer explains the issue well: https://stackoverflow.com/a/57854008/2142816

The fix here simply moves the data formatting outside of the component.

railway-app[bot] commented 7 months ago

This PR was not deployed automatically as @joewagner does not have access to the Railway project.

In order to get automatic PR deploys, please add @joewagner to your team on Railway.