File tree 2 files changed +43
-4
lines changed
packages/ui/src/components/va-data-table
2 files changed +43
-4
lines changed Original file line number Diff line number Diff line change @@ -197,3 +197,34 @@ export const ExpandableRow = () => ({
197
197
</VaDataTable>
198
198
` ,
199
199
} )
200
+
201
+ export const NoDataText = ( ) => ( {
202
+ components : { VaDataTable, VaPagination } ,
203
+ data : ( ) => ( { columns, items } ) ,
204
+
205
+ template : `
206
+ <VaDataTable :items="[]" :columns="columns" no-data-html="Test no data" />
207
+ ` ,
208
+ } )
209
+
210
+ export const NoDataTextSlot = ( ) => ( {
211
+ components : { VaDataTable, VaPagination } ,
212
+ data : ( ) => ( { columns, items } ) ,
213
+
214
+ template : `
215
+ <VaDataTable :items="[]" :columns="columns">
216
+ <template #no-data>
217
+ <div class="text-center">No data Test</div>
218
+ </template>
219
+ </VaDataTable>
220
+ ` ,
221
+ } )
222
+
223
+ export const NoFilteredDataText = ( ) => ( {
224
+ components : { VaDataTable, VaPagination } ,
225
+ data : ( ) => ( { columns, items } ) ,
226
+
227
+ template : `
228
+ <VaDataTable :items="[]" :columns="columns" filter="Aaa" no-data-filtered-html="Test no filtered data" />
229
+ ` ,
230
+ } )
Original file line number Diff line number Diff line change 76
76
<td
77
77
class =" va-data-table__table-td no-data"
78
78
colspan =" 99999"
79
- v-html =" noDataHtml"
80
- />
79
+ >
80
+ <slot name =" no-data" >
81
+ <div v-html =" noDataHtml" />
82
+ </slot >
83
+ </td >
81
84
</tr >
82
85
83
86
<tr
88
91
<td
89
92
class =" va-data-table__table-td no-data"
90
93
colspan =" 99999"
91
- v-html =" noDataFilteredHtml"
92
- />
94
+ >
95
+ <slot name =" no-filtered-data" >
96
+ <slot name =" no-data" >
97
+ <div v-html =" noDataFilteredHtml" />
98
+ </slot >
99
+ </slot >
100
+ </td >
93
101
</tr >
94
102
95
103
<template
You can’t perform that action at this time.
0 commit comments