Skip to content

Commit

Permalink
webui: Add custom sorting for timestamp column
Browse files Browse the repository at this point in the history
  • Loading branch information
MangelWare authored and koute committed Jul 28, 2023
1 parent 8f7895e commit f8397e7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion webui/src/PageDataList.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ export default class PageDataList extends React.Component {
Cell: cell => {
return fmt_date_unix( cell.original.timestamp.secs );
},
maxWidth: 200
maxWidth: 200,
accessor: d => d.timestamp,
sortMethod: (a, b) => {
if (a.secs === b.secs) {
return a.fract_nsecs > b.fract_nsecs ? 1 : -1;
}
return a.secs > b.secs ? 1 : -1;
}
},
{
Header: "Binary",
Expand Down

0 comments on commit f8397e7

Please sign in to comment.