Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: DH-17861: Fix the warning about IrisGridModelUpdater render not being a pure function #2249

Merged

Conversation

vbabich
Copy link
Collaborator

@vbabich vbabich commented Oct 4, 2024

pendingRowCount and pendingDataMap setters in IrisGridModelUpdater were emitting an event in the render cycle, that caused a React warning about the render not being a pure function because the event triggered state update in IrisGrid.
Wrap the setters in useEffect instead of useOnChange so the events are emitted after the render.

@vbabich vbabich self-assigned this Oct 4, 2024
@vbabich vbabich requested review from a team and dgodinez-dh and removed request for a team October 4, 2024 17:57
@vbabich vbabich enabled auto-merge (squash) October 4, 2024 17:58
Copy link

codecov bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.41%. Comparing base (ec9b41e) to head (4570bd4).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2249      +/-   ##
==========================================
- Coverage   46.61%   46.41%   -0.20%     
==========================================
  Files         692      698       +6     
  Lines       38508    38767     +259     
  Branches     9826     9866      +40     
==========================================
+ Hits        17949    17993      +44     
- Misses      20506    20720     +214     
- Partials       53       54       +1     
Flag Coverage Δ
unit 46.41% <100.00%> (-0.20%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vbabich vbabich merged commit 9e83393 into deephaven:main Oct 4, 2024
10 of 11 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 4, 2024
@vbabich vbabich deleted the fix_update_in_IrisGridModelUpdater_render branch October 4, 2024 18:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants