@@ -15,8 +15,6 @@ export interface PathTableState {
1515 selectedPathNode : undefined | Keys . PathNode ;
1616}
1717
18- type InterpretedResultsColumn = InterpretedResultsSortColumn | 'file-position' ;
19-
2018export class PathTable extends React . Component < PathTableProps , PathTableState > {
2119 constructor ( props : PathTableProps ) {
2220 super ( props ) ;
@@ -56,18 +54,15 @@ export class PathTable extends React.Component<PathTableProps, PathTableState> {
5654 }
5755 }
5856
59- getNextSortState ( column : InterpretedResultsColumn ) : InterpretedResultsSortState | undefined {
60- if ( column === 'file-position' ) {
61- return undefined ;
62- }
57+ getNextSortState ( column : InterpretedResultsSortColumn ) : InterpretedResultsSortState | undefined {
6358 const oldSortState = this . props . resultSet . sortState ;
6459 const prevDirection = oldSortState && oldSortState . sortBy === column ? oldSortState . sortDirection : undefined ;
65- const nextDirection = nextSortDirection ( prevDirection ) ;
60+ const nextDirection = nextSortDirection ( prevDirection , true ) ;
6661 return nextDirection === undefined ? undefined :
6762 { sortBy : column , sortDirection : nextDirection } ;
6863 }
6964
70- toggleSortStateForColumn ( column : InterpretedResultsSortColumn | 'file-position' ) : void {
65+ toggleSortStateForColumn ( column : InterpretedResultsSortColumn ) : void {
7166 vscode . postMessage ( {
7267 t : 'changeInterpretedSort' ,
7368 sortState : this . getNextSortState ( column ) ,
@@ -80,8 +75,7 @@ export class PathTable extends React.Component<PathTableProps, PathTableState> {
8075 const header = < thead >
8176 < tr >
8277 < th colSpan = { 2 } > </ th >
83- < th className = { this . sortClass ( 'alert-message' ) + ' vscode-codeql__alert-message-cell' } colSpan = { 2 } onClick = { ( ) => this . toggleSortStateForColumn ( 'alert-message' ) } > Message</ th >
84- < th className = { 'sort-none vscode-codeql__location-cell' } onClick = { ( ) => this . toggleSortStateForColumn ( 'file-position' ) } > Location</ th >
78+ < th className = { this . sortClass ( 'alert-message' ) + ' vscode-codeql__alert-message-cell' } colSpan = { 3 } onClick = { ( ) => this . toggleSortStateForColumn ( 'alert-message' ) } > Message</ th >
8579 </ tr >
8680 </ thead > ;
8781
0 commit comments