assets/js/function.js
/**
 * Sort the multidimensional array in ascending/descending order
 *
 * @param {Boolean} asc Checks weather column needs to be sorted ascending.
 */
Sort the multidimensional array in ascending/descending order
@param {Boolean} asc Checks weather column needs to be sorted ascending.
Sort the multidimensional array in ascending / descending order @param { Boolean } asc Checks weather column needs to be sorted ascending .
function sortColumn(asc = false) {
  const isAsc = asc ? 1 : -1;
  spreadSheet.sort((a, b) => {
    a = a[currentColHeaderIndex];
    b = b[currentColHeaderIndex];
    if (a === b) return 0;
    else if (a === "") return 1;
    else if (b === "") return -1;
    else return a < b ? -isAsc : isAsc;
  });
  updateUI();
}
function sortColumn ( asc = false ) { const isAsc = asc ? 1 : - 1 ; spreadSheet . sort ( ( a , b ) => { a = a [ currentColHeaderIndex ] ; b = b [ currentColHeaderIndex ] ; if ( a === b ) return 0 ; else if ( a === "" ) return 1 ; else if ( b === "" ) return - 1 ; else return a < b ? - isAsc : isAsc ; } ) ; updateUI ( ) ; }
Sort the multidimensional array in ascending/descending order
 @param {Boolean} asc Checks weather column needs to be sorted ascending.
Sort the multidimensional array in ascending / descending order @param { Boolean } asc Checks weather column needs to be sorted ascending .
// console.log("sortedIndex ", currentColHeaderIndex); // console.log("AFTER SORT");