Skip to content

fix: DH-19882: Table not updating correctly when using react v18#2486

Merged
mofojed merged 1 commit intodeephaven:mainfrom
mofojed:DH-19882-react-v18-grid-update
Jul 10, 2025
Merged

fix: DH-19882: Table not updating correctly when using react v18#2486
mofojed merged 1 commit intodeephaven:mainfrom
mofojed:DH-19882-react-v18-grid-update

Conversation

@mofojed
Copy link
Copy Markdown
Member

@mofojed mofojed commented Jul 10, 2025

  • We added a check in fix: Infinite loop with grid rendering #1631 in Grid.componentDidUpdate to avoid doing more work than necessary, however that actually broke things on React v18
    • In v17 it would still go through the rest of the function, because changedProps.length was === 0 and would skip the early return, and then it would draw the grid
  • Just update the canvas in this case

- We added a check in deephaven#1631 in Grid.componentDidUpdate to avoid doing more work than necessary, however that actually broke things on React v18
  - In v17 it would still go through the rest of the function, because changedProps.length was === 0 and would skip the early return, and then it would draw the grid
- Just update the canvas in this case
@mofojed mofojed requested a review from a team July 10, 2025 19:51
@mofojed mofojed self-assigned this Jul 10, 2025
@mofojed mofojed requested review from dgodinez-dh and removed request for a team July 10, 2025 19:51
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 10, 2025

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 44.62%. Comparing base (e32b68f) to head (4ae283c).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
packages/grid/src/Grid.tsx 60.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #2486    +/-   ##
========================================
  Coverage   44.62%   44.62%            
========================================
  Files         759      759            
  Lines       42548    42549     +1     
  Branches    10693    10887   +194     
========================================
+ Hits        18988    18989     +1     
+ Misses      23549    23504    -45     
- Partials       11       56    +45     
Flag Coverage Δ
unit 44.62% <60.00%> (+<0.01%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mofojed mofojed merged commit 332e311 into deephaven:main Jul 10, 2025
11 checks passed
@mofojed mofojed deleted the DH-19882-react-v18-grid-update branch July 10, 2025 20:12
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 10, 2025
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