-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use slot content for expandable rows in FInteractiveTable (refs …
…SFKUI-6935) fixes #157
- Loading branch information
1 parent
26ef65c
commit 76a1403
Showing
7 changed files
with
105 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
...ages/vue/src/components/FInteractiveTable/examples/FInteractiveTableExpandableExample.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<script setup> | ||
import { FInteractiveTable, FTableColumn } from "@fkui/vue"; | ||
const rows = [ | ||
{ | ||
id: "1", | ||
name: "Utbetalning", | ||
date: "2023-09-27", | ||
sum: 1200, | ||
myExpandableRow: [ | ||
{ | ||
id: "1a", | ||
name: "Barnbidrag", | ||
date: "2023-09-25", | ||
sum: 200, | ||
}, | ||
{ | ||
id: "1b", | ||
name: "Övrig ersättning", | ||
date: "2023-09-27", | ||
sum: 1000, | ||
}, | ||
], | ||
}, | ||
{ | ||
id: "2", | ||
name: "Utbetalning", | ||
date: "2023-12-25", | ||
sum: 1000, | ||
myExpandableRow: [ | ||
{ | ||
id: "2a", | ||
name: "Barnbidrag", | ||
date: "2023-12-25", | ||
sum: 1000, | ||
}, | ||
], | ||
}, | ||
]; | ||
</script> | ||
|
||
<template> | ||
<f-interactive-table :rows expandable-attribute="myExpandableRow" key-attribute="id"> | ||
<template #caption> Expanderbara rader </template> | ||
<template #default="{ row }"> | ||
<f-table-column name="compensation" title="Ersättning"> {{ row.name }} </f-table-column> | ||
<f-table-column name="id" title="Id" shrink> {{ row.id }} </f-table-column> | ||
<f-table-column name="date" title="Datum" type="date"> {{ row.date }} </f-table-column> | ||
<f-table-column name="amount" title="Summa" type="numeric"> | ||
{{ row.sum }} kronor | ||
</f-table-column> | ||
</template> | ||
</f-interactive-table> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters