private processSortEvent()

in components/RunCard.TreeColumnSorting.ts [41:57]


	private processSortEvent(event: React.KeyboardEvent<HTMLElement> | React.MouseEvent<HTMLElement>) {
		const clickedCell = cellFromEvent(event)

		if (clickedCell.rowIndex === -1) {
			const column = this.props.columns[clickedCell.cellIndex]

			// If the column is currently sorted ascending then we need to invert the sort.
			if (column && column.sortProps) {
				this.onSort(
					clickedCell.cellIndex,
					column.sortProps.sortOrder === SortOrder.ascending ? SortOrder.descending : SortOrder.ascending,
					event
				)
				event.preventDefault()
			}
		}
	}