Skip to content

Commit

Permalink
createDatatableColumnsConfig add support for expand
Browse files Browse the repository at this point in the history
  • Loading branch information
volar committed Jun 12, 2024
1 parent 7d8734a commit 1b6c466
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/composables/system/datatableColumns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 1b6c466

Please sign in to comment.