-
Notifications
You must be signed in to change notification settings - Fork 4
Fix role select not working when adding a team member #1698
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
Fix role select not working when adding a team member #1698
Conversation
WalkthroughThis pull request refactors the member addition form from a traditional form-based submission model to a modal-driven approach. The MemberAddForm component restructures its UI layout, introducing dedicated field containers and moving submission logic to an onClick handler. The underlying useStrongForm hook is simplified by replacing its useCallback wrapper with a plain function and consolidating error handling. Additionally, the Select component's trigger button receives an explicit Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
| <NewButton | ||
| type="submit" | ||
| csVariant="accent" | ||
| onSubmit={strongForm.handleSubmit} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The onSubmit prop is passed to NewButton, but since the surrounding <form> element has been removed, this event handler will never be triggered. Buttons do not fire submit events on click; they fire click events. To fix this, change onSubmit to onClick so the form submission logic executes when the button is clicked.
onClick={strongForm.handleSubmit}| onSubmit={strongForm.handleSubmit} | |
| onClick={strongForm.handleSubmit} |
Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.
This comment came from an experimental review—please leave feedback if it was helpful/unhelpful. Learn more about experimental comments here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Oksamies fix this
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1698 +/- ##
==========================================
- Coverage 15.64% 15.63% -0.02%
==========================================
Files 326 326
Lines 23232 23230 -2
Branches 721 721
==========================================
- Hits 3635 3632 -3
- Misses 19597 19598 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
VilppeRiskidev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the graphite comment
This issue is caused by bad Radix code. Root cause can be found here radix-ui/primitives#3759 The fix is quite temporary and ideally should be fixed by refactoring select to be a homebaked component
6f778ba to
ee42016
Compare
|
Noticed that the (it doesn't do anything as the values it were checking against had nothing to do with the forms data fields) |

This issue is caused by bad Radix code. Root cause can be found here radix-ui/primitives#3759
The fix is quite temporary and ideally should be fixed by refactoring
select to be a homebaked component