Skip to content

Commit

Permalink
update query age column sort to use settings
Browse files Browse the repository at this point in the history
  • Loading branch information
pburnsdata committed Oct 3, 2018
1 parent 3a66a0c commit cbba231
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion build/queryOverview.js
Original file line number Diff line number Diff line change
Expand Up @@ -1545,13 +1545,15 @@
function manualSort() {
var _this = this;

var context = this;

this.data.manually_sorted = this.data.raw.sort(function(a, b) {
var order = 0;

_this.sortable.order.forEach(function(item) {
var aCell = a[item.col];
var bCell = b[item.col];
if (item.col !== 'Query Age') {
if (item.col !== context.chart.initialSettings.age_col) {
if (order === 0) {
if (
(item.direction === 'ascending' && aCell < bCell) ||
Expand Down
4 changes: 3 additions & 1 deletion src/listing/onDraw/onClick/manualSort.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
export default function manualSort() {
const context = this;

this.data.manually_sorted = this.data.raw.sort((a, b) => {
let order = 0;

this.sortable.order.forEach(item => {
const aCell = a[item.col];
const bCell = b[item.col];
if (item.col !== 'Query Age') {
if (item.col !== context.chart.initialSettings.age_col) {
if (order === 0) {
if (
(item.direction === 'ascending' && aCell < bCell) ||
Expand Down

0 comments on commit cbba231

Please sign in to comment.