Repository navigation
fix(inbounds): list clients in the detach/attach modals when they mount open - #6736
Merged
Merged
Conversation
DetachClientsModal seeded its synced-source state with the open source, so a modal first mounted with open and a source saw no change on its first render and never read the client rows. The table stayed empty until the modal was closed and reopened. Seed the state with null so the first open render loads the rows, as the reset-during-render check already expects. The test mounts the modal already open and fails without this change. Fixes MHSanaei#6733
AttachClientsModal seeds its synced-source state the same way DetachClientsModal did, so a modal first mounted with open and a source saw no change on its first render and never read the client rows. The table stayed empty, and nothing was pre-selected, until the modal was closed and reopened. Seed the state with null here too. The test mounts the attach modal already open and fails without this change. Refs MHSanaei#6733
Contributor
|
No blocking issues. 0 HIGH / 0 MEDIUM / 1 LOW, 0 pre-existing
The fix is correct as read. Before the change, Reviewed head: b23a3cb Coverage (4 files, +81/−2):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The detach and attach client modals now load their client rows when first mounted already open.
Why
Fixes #6733. DetachClientsModal (and AttachClientsModal, same pattern) seeded its synced-source state so a modal first mounted open saw no change on first render and never loaded the rows; the table stayed empty until closed and reopened. Both now load on mount when open.
Type of change
Areas affected
How was this tested?
Added detach-clients-modal and attach-clients-modal tests that mount the modal open; both fail on the base commit and pass with the fix.
Screenshots / recordings
N/A
Breaking changes
None
Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass.Not ticked: I ran only the two new tests on HEAD, not go build, lint, typecheck, or the full build.