Update
This commit is contained in:
@@ -144,7 +144,7 @@ Vue.component('tt-table', {
|
||||
(column.filter === 'dateRange' ? 'min-width: 260px;' : '') +
|
||||
(originalColumnWidths[column.key] ? 'width: ' + originalColumnWidths[column.key] + 'px;' : '')"
|
||||
>
|
||||
<div style="text-align:center; white-space: nowrap;word-break: keep-all;"
|
||||
<div style="text-align:center; white-space: nowrap;word-break: keep-all;user-select: none;"
|
||||
:style="{ 'cursor': column.sortable ? 'pointer' : 'default' }"
|
||||
@click="column.sortable ? setOrder(column.key) : undefined">
|
||||
{{ column.text }}
|
||||
@@ -774,4 +774,19 @@ Vue.component('tt-table', {
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.debounce(this.handleResponsiveColumns, 100));
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Vue.config.errorHandler = function(err, vm, info) {
|
||||
// still log errors to the console
|
||||
console.error(info, err, vm);
|
||||
|
||||
if (typeof vm.config.key === 'string') {
|
||||
// check if document.querySelector table.tt-table exists aswell if it has atleast 3 <tr> elements
|
||||
const table = document.querySelector('table.tt-table');
|
||||
if (!table || !table.querySelectorAll('tr').length > 2) {
|
||||
// localStorage.removeItem(`tt-table-${vm.config.key}`);
|
||||
// window.location.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user