Skip to content

Commit 9b725e7

Browse files
committed
Fix: persist sortOption in setter methods
1 parent 57f2b86 commit 9b725e7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/components/conformance/ResultsDisplay/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export default function ResultsDisplay(props: ResultsProps): JSX.Element {
9090
props.state.version,
9191
newPath,
9292
props.state.ecmaScriptVersion,
93+
props.state.sortOption,
9394
),
9495
});
9596
};
@@ -105,6 +106,7 @@ export default function ResultsDisplay(props: ResultsProps): JSX.Element {
105106
props.state.version,
106107
slicedPath,
107108
props.state.ecmaScriptVersion,
109+
props.state.sortOption,
108110
),
109111
});
110112
};

src/components/conformance/ResultsDisplay/nav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ type SortProps = {
132132
};
133133

134134
function SortingDropdown(props: SortProps): JSX.Element {
135-
const [sortValue, setSortValue] = React.useState<string | undefined>();
135+
const [sortValue, setSortValue] = React.useState<string>(props.sortValue ? props.sortValue : "alpha");
136136

137137
React.useEffect(() => {
138138
setSortValue(props.sortValue);

0 commit comments

Comments
 (0)