Skip to content

Commit

Permalink
Sort by start time (#887)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sangyoon21 authored Jun 25, 2024
1 parent a100753 commit af4a85b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test-result-summary-client/src/Build/DeepHistory.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const DeepHistory = () => {
const [searchText, setSearchText] = useState('');
const [sortedInfo, setSortedInfo] = useState({
order: 'descend',
columnKey: 'parentBuild',
columnKey: 'startTime',
});

const location = useLocation();
Expand Down Expand Up @@ -171,6 +171,7 @@ const DeepHistory = () => {
sorter: (a, b) => {
return a.startTime.localeCompare(b.startTime);
},
sortOrder: sortedInfo.columnKey === 'startTime' && sortedInfo.order,
},
{
title: 'Action',
Expand Down Expand Up @@ -212,6 +213,8 @@ const DeepHistory = () => {
title={() => testName}
pagination={{ pageSize: 50 }}
onChange={handleChange}
defaultSortOrder="descend"
defaultSortField="startTime"
/>
</div>
);
Expand Down

0 comments on commit af4a85b

Please sign in to comment.