Skip to content

Commit

Permalink
Fix keep forever selection box (#861)
Browse files Browse the repository at this point in the history
fixes: #857

Signed-off-by: Lan Xia <[email protected]>
  • Loading branch information
llxia authored Mar 28, 2024
1 parent a8cd962 commit 5ed3b21
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions test-result-summary-client/src/Build/TopLevelBuildTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ function TopLevelBuildTable(props) {

// Declare a function that handles the Keep Forever checkbox.
async function handleKeepForverClick(record) {
// Destructure the 'buildInfo' object from an object with an undefined property named 'buildInfo'.
const { buildInfo } = { buildInfo };
// If the 'record' object has a 'key' property:
if (record.key) {
// Loop through each 'build' object in the 'buildInfo' array:
Expand All @@ -100,9 +98,7 @@ function TopLevelBuildTable(props) {
break;
}
}
// Wait for 100ms before setting the 'buildInfo' state variable.
await new Promise((r) => setTimeout(r, 100));
setBuildInfo(buildInfo);
setBuildInfo(structuredClone(buildInfo));
}
}

Expand Down

0 comments on commit 5ed3b21

Please sign in to comment.