From 4456c3e8fb9c6476fa34b8c43b1dc03979d45ea0 Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Tue, 23 Jul 2024 16:50:25 +0200 Subject: [PATCH 1/3] added disable-filtering option --- public/plugins/vue/tt-components/tt-table.js | 23 ++++++++++---------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/public/plugins/vue/tt-components/tt-table.js b/public/plugins/vue/tt-components/tt-table.js index 2aebd6873..25c82c5ed 100644 --- a/public/plugins/vue/tt-components/tt-table.js +++ b/public/plugins/vue/tt-components/tt-table.js @@ -149,21 +149,21 @@ Vue.component('tt-table', { (column.filter === 'dateRange' ? 'min-width: 260px;' : '') + (originalColumnWidths[column.key] ? 'width: ' + originalColumnWidths[column.key] + 'px;' : '')" > -
+ @click="column.sortable && !disableFiltering ? setOrder(column.key) : undefined"> {{ column.text }} -
- - - - - - + + + + + + @@ -264,7 +264,8 @@ Vue.component('tt-table', { excelExport: {type: Boolean, default: false}, config: {type: Object, default: () => ({}), required: true}, ssr: {type: Boolean, default: false}, - disableInitialFetch: {type: Boolean, default: false} + disableInitialFetch: {type: Boolean, default: false}, + disableFiltering: {type: Boolean, default: false} }, data() { return { window: window, From f090cea9a8d62623095cac4795e07d8676a78e14 Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Tue, 23 Jul 2024 17:15:13 +0200 Subject: [PATCH 2/3] added headerClass property to tt-table --- public/plugins/vue/tt-components/tt-table.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/plugins/vue/tt-components/tt-table.js b/public/plugins/vue/tt-components/tt-table.js index 25c82c5ed..7e6bfe15a 100644 --- a/public/plugins/vue/tt-components/tt-table.js +++ b/public/plugins/vue/tt-components/tt-table.js @@ -15,6 +15,7 @@ * For 'iconSelect', an additional 'icon' property (CSS class for the icon) is required. * @property {boolean} [sortable=true] - (Optional) Indicates whether the column is sortable. Default is true. * @property {string} [class] - (Optional) Additional CSS classes to apply to the column. + * @property {string} [headerClass] - (Optional) Additional CSS classes to apply to the column header. * @property {string} [suffix] - (Optional) Additional CSS classes to apply to the column. * @property {string} [prefix] - (Optional) Additional CSS classes to apply to the column. * */ @@ -144,13 +145,13 @@ Vue.component('tt-table', {
{{ column.text }} @@ -596,6 +597,7 @@ Vue.component('tt-table', { filterOptions: column.filterOptions || undefined, sortable: column.sortable !== undefined ? column.sortable : true, class: column.class !== undefined ? column.class : '', + headerClass: column.headerClass || false, prefix: column.prefix || '', suffix: column.suffix || '', priority: column.priority + 100 || i-- From cd716a2e3047a77a555c02bfb7c63865abcd97bd Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Tue, 23 Jul 2024 14:19:54 +0000 Subject: [PATCH 3/3] Feature/tt table header class --- public/plugins/vue/tt-components/css/tt-table.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/plugins/vue/tt-components/css/tt-table.css b/public/plugins/vue/tt-components/css/tt-table.css index 235d1365b..76d83e178 100644 --- a/public/plugins/vue/tt-components/css/tt-table.css +++ b/public/plugins/vue/tt-components/css/tt-table.css @@ -327,3 +327,8 @@ td { height: 21px; grid-column-start: 3; } + +.tt-table-header { + vertical-align: top !important; + text-align: center; +} \ No newline at end of file