Merge branch 'bugfix/table-columns' into 'master'
fixed table column disappearing See merge request fronk/thetool!493
This commit is contained in:
@@ -315,8 +315,7 @@ Vue.component('tt-table', {
|
||||
* @param {number} page The page number to fetch data for.
|
||||
* @async
|
||||
*/
|
||||
async fetchData(page = 1) {
|
||||
console.log('Fetching data...');
|
||||
async fetchData(page = 0) {
|
||||
this.expandedRows = {};
|
||||
|
||||
try {
|
||||
@@ -523,7 +522,7 @@ Vue.component('tt-table', {
|
||||
|
||||
if (i === 0) continue;
|
||||
|
||||
else if (viewportWidth < 0) {
|
||||
else if (viewportWidth +10 < 0) {
|
||||
this.hiddenColumns.push(columns[i].key)
|
||||
}
|
||||
}
|
||||
@@ -737,7 +736,7 @@ Vue.component('tt-table', {
|
||||
// order the output using this.order in most performant way
|
||||
if (this.order.key) {
|
||||
function naturalSort(a, b) {
|
||||
return a.localeCompare(b, undefined, {numeric: true, sensitivity: 'base'});
|
||||
return a.toString().localeCompare(b.toString(), undefined, {numeric: true, sensitivity: 'base'});
|
||||
}
|
||||
|
||||
const isDateColumn = this.columns[this.order.key].filter === 'date';
|
||||
@@ -828,5 +827,4 @@ Vue.config.errorHandler = function (err, vm, info) {
|
||||
// window.location.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user