From 5ed3b2164b10017fa9aa2306eb4461d01375a7a7 Mon Sep 17 00:00:00 2001 From: Lan Xia Date: Wed, 27 Mar 2024 22:01:39 -0400 Subject: [PATCH] Fix keep forever selection box (#861) fixes: https://github.com/adoptium/aqa-test-tools/issues/857 Signed-off-by: Lan Xia --- test-result-summary-client/src/Build/TopLevelBuildTable.jsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test-result-summary-client/src/Build/TopLevelBuildTable.jsx b/test-result-summary-client/src/Build/TopLevelBuildTable.jsx index cab8ba7a..c4c60620 100644 --- a/test-result-summary-client/src/Build/TopLevelBuildTable.jsx +++ b/test-result-summary-client/src/Build/TopLevelBuildTable.jsx @@ -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: @@ -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)); } }