Skip to content

Commit

Permalink
fix(ui-results): prevent duplicate updates on same toggle button click
Browse files Browse the repository at this point in the history
  • Loading branch information
hdinia committed Feb 23, 2024
1 parent 0095197 commit 35947e1
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,11 @@ function ResultDetails() {

const handleItemTypeChange: ToggleButtonGroupProps["onChange"] = (
_,
value: OutputItemType,
newValue: OutputItemType,
) => {
setItemType(value);
if (newValue && newValue !== itemType) {
setItemType(newValue);
}
};

const handleDownload = (matrixData: MatrixType, fileName: string): void => {
Expand Down

0 comments on commit 35947e1

Please sign in to comment.