gregnb / gregnb/mui-datatables

customBodyRender firing twice

Open
#598 7 comments 2 reactions 0 assignees View on GitHub
enhancement on hold
Dominant language
JavaScript
Stars
2.7k
Forks
906
PR merge metrics
No merged PRs in 30d

Description

Is there a reason why customBodyRender gets called twice? I noticed it on my current project, but then reproduced it on a sample project that I found.

I forked from someone elses code and added a console.log, you'll notice it is being called twice.
https://codesandbox.io/s/p5m1m1kwwq

The first time it appears that updateValue is undefined, and the next time it has a value. My use case is probably different than most, as I am updating state depending on the row (infinite scrolling).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.