[Customer Portal Webapp] Prevent Add Product dropdown from capping at 20 items on scroll - #1012
Conversation
…own from capping at 20 items
|
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)
📝 WalkthroughWalkthroughThe ChangesPagination Merge Refactor
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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 |
Summary
products/versionsstate in the accumulationuseEffectdependency array caused a re-run after each merge; the duplicate-ID guard found no new items and incorrectly settotalRecordsto the current list length, blocking further scroll-triggered loadsproductsRef,versionsRef) so the effect only fires when new API data arrives, not when state is updatedTest plan
Summary by CodeRabbit