fixed table column disappearing

This commit is contained in:
2024-07-16 17:59:59 +02:00
parent 43a0c11de3
commit 1d3acd70e3

View File

@@ -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();
}
}
}
}