Skip to content

Commit

Permalink
[frontend] reselect the last endpoint selected after after a data rel… (
Browse files Browse the repository at this point in the history
#1353)

[frontend] select last selected endpoint after a data reload in an atomic testing (#1308)
  • Loading branch information
guillaumejparis authored Aug 28, 2024
1 parent 2224367 commit 12bc4aa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const AtomicTesting = () => {
// Fetching data
const { injectResultDto } = useContext<InjectResultDtoContextType>(InjectResultDtoContext);
useEffect(() => {
setSelectedTarget(currentParentTarget || injectResultDto?.inject_targets[0]);
setSelectedTarget(selectedTarget || currentParentTarget || injectResultDto?.inject_targets[0]);
}, [injectResultDto]);

const sortedTargets: InjectTargetWithResult[] = filtering.filterAndSort(injectResultDto?.inject_targets ?? []);
Expand Down

0 comments on commit 12bc4aa

Please sign in to comment.