Skip to content

Commit

Permalink
Fix parent data source unchecked
Browse files Browse the repository at this point in the history
Signed-off-by: Lin Wang <[email protected]>
  • Loading branch information
wanglam committed Aug 27, 2024
1 parent 2409005 commit 4f6d8d9
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,9 @@ export const AssociationDataSourceModal = ({
);
const isParentCheckedThisTime = newCheckedConnectionIds.includes(parentConnection.id);

// Parent change to checked this time
if (!isParentCheckedLastTime && isParentCheckedThisTime) {
option.checked = 'on';
}

// This won't be executed since checked options already been filter out
if (isParentCheckedLastTime && isParentCheckedThisTime) {
option.checked = undefined;
// Update checked status if parent checked status changed this time
if (isParentCheckedLastTime !== isParentCheckedThisTime) {
option.checked = isParentCheckedThisTime ? 'on' : undefined;
}
}
}
Expand Down

0 comments on commit 4f6d8d9

Please sign in to comment.