Commit 0251a6d
committed
Resolves #6478 (FR-2491)
## Summary
- Fixed a bug where closing the Fair Share weight settings modal without making changes would clear the project (and domain/user) row selection in the table.
- The `onRequestClose` handler in `FairShareList.tsx` was unconditionally calling `setSelectedRows([])` on modal close, even when the modal was opened for a single-row settings edit. Now `selectedRows` is only cleared when the save was successful or when the bulk edit modal (opened via the bulk edit button) is cancelled.
## Root Cause
When a user clicked the settings icon on a single row, `selectedSingleRow` was set to open the modal. On modal close (cancel), `setSelectedRows([])` wiped the checkbox selections even though those were unrelated to the single-row edit.
## Test plan
- [ ] Select multiple projects via checkboxes in Fair Share project step
- [ ] Click the settings icon on a single project row to open the weight setting modal
- [ ] Close the modal without making changes
- [ ] Verify the checkbox selections are preserved
- [ ] Open the bulk edit modal (via the bulk edit button in the toolbar) and cancel
- [ ] Verify the checkbox selections are cleared (expected behavior for bulk edit cancel)
- [ ] Make a successful edit and verify selections are cleared after save
🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 23c1110 commit 0251a6d
1 file changed
Lines changed: 1 addition & 1 deletion
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
873 | 873 | | |
874 | 874 | | |
875 | 875 | | |
| 876 | + | |
876 | 877 | | |
877 | | - | |
878 | 878 | | |
879 | 879 | | |
880 | 880 | | |
| |||
0 commit comments