Skip to content

Commit

Permalink
Merge pull request opensearch-project#2 from wanglam/fix-dqc-selection
Browse files Browse the repository at this point in the history
Fix modal dqc selection
  • Loading branch information
yubonluo authored Aug 28, 2024
2 parents 20db731 + 4f6d8d9 commit 49377ce
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 49377ce

Please sign in to comment.