-
Notifications
You must be signed in to change notification settings - Fork 817
Fix: User Management email column closure bug #9485
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
base: master
Are you sure you want to change the base?
Fix: User Management email column closure bug #9485
Conversation
The email column in User Management was using accessorKey which gets converted to accessorFn in PgTable.jsx. This caused a closure bug where all columns captured the same accessorKey value, resulting in all users displaying the logged-in user's email address. Fix by explicitly using accessorFn to avoid the closure issue.
WalkthroughThe Email column accessor in the Users component was modified to retrieve values via a function instead of a direct property reference, with null-safety handling to ensure empty strings are returned when email is absent. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (2)
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 |
|
Hi @mktwix, can you please provide a screenshot of the mentioned bug in this PR? |
|
@mktwix In addition to what Khushboo asked, if the issue is closure in PgTable then I think PgTable should be fixed. |
|
@khushboovashi @adityatoshniwal |

The email column in User Management was using accessorKey which gets converted to accessorFn in PgTable.jsx. This caused a closure bug where all columns captured the same accessorKey value, resulting in all users displaying the logged-in user's email address.
Fix by explicitly using accessorFn to avoid the closure issue.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.