Change in Table Expansion
This commit is contained in:
@@ -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"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user