fix(dashboard): Use index-based identification for collection filters#4428
fix(dashboard): Use index-based identification for collection filters#4428grolmus wants to merge 1 commit intovendurehq:masterfrom
Conversation
Collection filters with the same type were sharing state incorrectly. The onOperationValueChange function compared filters by code, causing all filters of the same type to update when any one changed. Changed to index-based identification to match the pattern already used by onCombinationModeChange. Fixes vendurehq#4327
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis pull request addresses a state management bug in collection filters where multiple filters of the same type incorrectly shared synchronized values. The fix involves two key changes: (1) activating a regression test in the test suite that validates the independent state of multiple same-type filters, and (2) refactoring the Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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
onOperationValueChangeto use index-based identification instead of code-basedThe bug was in
configurable-operation-multi-selector.tsxwhere filters were identified bycode, causing all filters of the same type to update when any one changed.Test plan
issue-4327-collection-filter-state.spec.tsregression testFixes #4327