1
- < th:block th:fragment ="dsfr-table(list, componentId, selectable, rowKey, rowsPerPage, sortUrl, sortBy, descending, navOnRow, color, tableClass, autoColClass, title, v-title, subtitle, v-subtitle, dontUseHeading, top_right_slot, top_left_slot, header_slot, actions_slot, additional_content_slot, contentTags, tr_attrs, item_attrs, table_attrs) "
2
- th:assert ="${componentId} != null and !(${sortUrl} != null and ${sortBy} != null) and !(${descending} != null and ${sortBy} == null) "
3
- th:with ="tableKey=${list},
1
+ < th:block
2
+ th:fragment ="dsfr-table(list, componentId, selectable, rowKey, rowsPerPage, sortUrl, sortBy, descending, navOnRow, color, tableClass, autoColClass, title, v-title, subtitle, v-subtitle, dontUseHeading, top_right_slot, top_left_slot, header_slot, actions_slot, table_slot, additional_content_slot, contentTags, tr_attrs, item_attrs, table_attrs) "
3
+ th:assert ="${componentId} != null and !(${sortUrl} != null and ${sortBy} != null) and !(${descending} != null and ${sortBy} == null) "
4
+ th:with ="tableKey=${list},
4
5
rowIndex='props.rowIndex',
5
6
listSize=${model.vContext[__${list}__].size()},
6
7
mySelectable=${selectable?:false},
9
10
myAutoColClass=${autoColClass?:false} ">
10
11
11
12
< th:block th:attr ="objectKey=${model.vContext['componentStates'].addComponentState(componentId).addList('columns')},
13
+ objectKey=${model.vContext['componentStates'][__${componentId}__].addList('sortableRows')},
12
14
objectKey=${model.vContext['componentStates'][__${componentId}__].addList('selected')},
13
15
objectKey=${model.vContext['componentStates'][__${componentId}__][loading] = false },
14
- objectKey=${model.vContext['componentStates'][__${componentId}__].addObject('pagination', {'page': 1 , 'rowsPerPage' : myRowsPerPage, 'componentId' : componentId, 'listKey' : list})} " th:remove ="all " />
15
- < th:block th:if ="${sortUrl != null} " th:attr ="objectKey=${model.vContext['componentStates'][__${componentId}__]['pagination'].put('sortUrl', sortUrl)} " th:remove ="all " />
16
- < th:block th:if ="${sortUrl != null} " th:attr ="objectKey=${model.vContext['componentStates'][__${componentId}__]['pagination'].put('rowsNumber', listSize)} " th:remove ="all " />
17
- < th:block th:if ="${sortBy != null} " th:attr ="objectKey=${model.vContext['componentStates'][__${componentId}__]['pagination'].put('sortBy', sortBy)} " th:remove ="all " />
18
- < th:block th:if ="${descending != null} " th:attr ="objectKey=${model.vContext['componentStates'][__${componentId}__]['pagination'].put('descending', descending)} " th:remove ="all " />
16
+ objectKey=${model.vContext['componentStates'][__${componentId}__].addObject('pagination', {'page': 1 , 'rowsPerPage' : myRowsPerPage, 'componentId' : componentId, 'listKey' : list})} "
17
+ th:remove ="all "/>
18
+ < th:block th:if ="${sortUrl != null} "
19
+ th:attr ="objectKey=${model.vContext['componentStates'][__${componentId}__]['pagination'].put('sortUrl', sortUrl)} "
20
+ th:remove ="all "/>
21
+ < th:block th:if ="${sortUrl != null} "
22
+ th:attr ="objectKey=${model.vContext['componentStates'][__${componentId}__]['pagination'].put('rowsNumber', listSize)} "
23
+ th:remove ="all "/>
24
+ < th:block th:if ="${sortBy != null} "
25
+ th:attr ="objectKey=${model.vContext['componentStates'][__${componentId}__]['pagination'].put('sortBy', sortBy)} "
26
+ th:remove ="all "/>
27
+ < th:block th:if ="${descending != null} "
28
+ th:attr ="objectKey=${model.vContext['componentStates'][__${componentId}__]['pagination'].put('descending', descending)} "
29
+ th:remove ="all "/>
19
30
20
- < dsfr-v-table th:title ="${vTitle==null?title?:'':''} " th::title ="${vTitle?:''} "
21
- th::columns ="|componentStates.${componentId}.columns| "
22
- th::rows ="|vueData.${list}| "
23
- th:attr ="__${table_attrs}__ ">
24
- < template v-slot:default ="{ props } ">
31
+ < dsfr-data-table th:title ="${vTitle==null?title?:'':''} " th::title ="${vTitle?:''} "
32
+ th::header-row ="|componentStates.${componentId}.columns| "
33
+ th::rows ="|vueData.${list}| "
34
+ th::rows-per-page ="|componentStates.${componentId}.pagination.rowsPerPage| "
35
+ th::sortable-rows ="|componentStates.${componentId}.sortableRows| "
36
+ th:attr ="__${table_attrs}__ ">
37
+ < vu:content-slot name ="table_slot " th:with ="label=null, title=null, vTitle=null "/>
38
+ < template #cell ="{ colKey, cell } ">
25
39
< vu:content > </ vu:content >
26
- < vu:dsfr-column name ="action " label ="Actions " sortable ="false " align ="right " th:if ="${actions_slot != null} ">
40
+ < vu:dsfr-column name ="action " label ="Actions " sortable ="false " align ="right "
41
+ th:if ="${actions_slot != null} ">
27
42
< vu:content-slot name ="actions_slot " th:with ="label=null, title=null, vTitle=null "/>
28
43
</ vu:dsfr-column >
29
44
</ template >
30
- </ dsfr-v -table >
45
+ </ dsfr-data -table >
31
46
32
47
</ th:block >
0 commit comments