From 1b6c466d44d5b975dc600b620366c4238632818a Mon Sep 17 00:00:00 2001 From: volar Date: Wed, 12 Jun 2024 18:01:38 +0200 Subject: [PATCH] createDatatableColumnsConfig add support for expand --- src/composables/system/datatableColumns.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/composables/system/datatableColumns.ts b/src/composables/system/datatableColumns.ts index 57141168..41b297e8 100644 --- a/src/composables/system/datatableColumns.ts +++ b/src/composables/system/datatableColumns.ts @@ -46,7 +46,8 @@ export function createDatatableColumnsConfig( subject: string | undefined = undefined, disableActions: boolean = false, customPagination: Pagination | undefined = undefined, - customI18n: undefined | any = undefined + customI18n: undefined | any = undefined, + showExpand: undefined| boolean = undefined ) { const localI18n = customI18n ?? i18n const { t } = localI18n.global || localI18n @@ -76,6 +77,7 @@ export function createDatatableColumnsConfig( const columnsVisible = computed(() => { const columns: any = [] + if (showExpand) columns.push({ key: 'data-table-expand', sortable: false }) columnsAll.forEach((column) => { if (!columnsHidden.value.includes(column.key)) { columns.push(column)