dist/js/space-table.js
// changed column to columnKey, because how it is called from the 'props.rows' watch function
changed column to columnKey, because how it is called from the 'props.rows' watch function
changed column to columnKey because how it is called from the ' props . rows ' watch function
sortColumn( column, toggle = true ) {
			const columnKey = column.key;
			if ( this.sortedColumn !== columnKey || !toggle ) {
				if ( toggle ) {
					this.sortDirection = -1;
				}
				let sortFunction = this.defaultSort;
				if ( this.sort.hasOwnProperty( columnKey ) ) { 
					sortFunction = this.sort[columnKey];
				}
				this.rows = this.rows.sort( ( a, b ) => sortFunction( a[columnKey], b[columnKey], a, b ) );
			}
			else {
				this.sortDirection *= -1;
				this.rows          = this.rows.reverse();
			}
			this.sortedColumn = columnKey;
		}
sortColumn ( column , toggle = true ) { const columnKey = column . key ; if ( this . sortedColumn !== columnKey || ! toggle ) { if ( toggle ) { this . sortDirection = - 1 ; } let sortFunction = this . defaultSort ; if ( this . sort . hasOwnProperty ( columnKey ) ) { sortFunction = this . sort [ columnKey ] ; } this . rows = this . rows . sort ( ( a , b ) => sortFunction ( a [ columnKey ] , b [ columnKey ] , a , b ) ) ; } else { this . sortDirection *= - 1 ; this . rows = this . rows . reverse ( ) ; } this . sortedColumn = columnKey ; }
changed column to columnKey, because how it is called from the 'props.rows' watch function
changed column to columnKey because how it is called from the ' props . rows ' watch function
// if we just sorted this column, // or need to sort it again because // of an activerow change, etc. // sort it up // eslint-disable-line // if this column is already the // column being sorted, just reverse it // indicate this column as sorted