fix: adds safety guard to ag grid#1946
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThree independent changes modernize grid API access and effect dependencies: ChangesAG Grid API Readiness Guard and Module Registration
Chat Timeout Effect Dependency Optimization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
mpawlow
left a comment
There was a problem hiding this comment.
Code Review 1
- ✅ Approved / LGTM 🚀
- See PR comments: (1a), (1b) for optional consideration (both MINOR nits)
- See Functional Review for requested changes (might be a user error on my part)
mpawlow
left a comment
There was a problem hiding this comment.
Functional Review 1
- ✅ Approved / LGTM 🚀
Added a small fix for this |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |




Problem: Calling
api.forEachNode()/api.getSelectedRows()before AG Grid's row model is fully initialized causes aRowApiModule not registerederror. This is a timing-dependent race condition on mount — more likely on slower machines or with React strict mode.Fix: Added a
gridReadyRefflag set by AG Grid'sonGridReadycallback, and agetGridApi()helper that returns null until the grid is ready. All 5 grid API call sites now go through this helper, so they safely no-op if called before initialization.Summary by CodeRabbit
Bug Fixes