Change in Table Expansion

This commit is contained in:
2024-12-11 21:56:05 +01:00
parent 847d8512e7
commit 05a4ecc654

View File

@@ -181,6 +181,13 @@ const updateWorkingTime = async (data) => {
await setupPage() await setupPage()
} }
const toggleRow = (row) => {
if(expand.value.openedRows.includes(row)){
expand.value.openedRows = []
} else {
expand.value.openedRows = [row]
}
}
const expand = ref({ const expand = ref({
openedRows: [], openedRows: [],
@@ -261,7 +268,7 @@ const expand = ref({
:columns="columns" :columns="columns"
:rows="filteredRows" :rows="filteredRows"
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Noch keine Einträge' }" :empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Noch keine Einträge' }"
@select="(i) => expand.openedRows = [i]" @select="(i) => toggleRow(i)"
v-model:expand="expand" v-model:expand="expand"
:multiple-expand="false" :multiple-expand="false"