File tree Expand file tree Collapse file tree 3 files changed +19
-9
lines changed
documentation/docs/tutorial/03-Customization Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -442,6 +442,7 @@ const props = defineProps<{
442442 record: any
443443 resource: any
444444 meta: any
445+ adminUser: any
445446}> ();
446447< / script>
447448` ` `
@@ -458,7 +459,7 @@ Component contract:
458459
459460Notes and tips:
460461- Requirements:
461- - Required <tr></tr> structure around </ slot>
462+ - Required ` < tr>< / tr> ` structure around ` < slot / > `
462463
463464## List table beforeActionButtons
464465
Original file line number Diff line number Diff line change 8383 </td >
8484 </tr >
8585
86- <tr @click =" onClick($event,row)"
87- v-else v-for =" (row, rowI) in rows" :key =" `row_${row._primaryKeyValue}`"
88- ref =" rowRefs"
89- class =" list-table-body-row bg-lightListTable dark:bg-darkListTable border-lightListBorder dark:border-gray-700 hover:bg-lightListTableRowHover dark:hover:bg-darkListTableRowHover"
90-
91- :class =" {'border-b': rowI !== rows.length - 1, 'cursor-pointer': row._clickUrl !== null}"
92- >
86+ <component
87+ v-else
88+ v-for =" (row, rowI) in rows"
89+ :is =" tableRowReplaceInjection ? getCustomComponent(tableRowReplaceInjection) : 'tr'"
90+ :key =" `row_${row._primaryKeyValue}`"
91+ :record =" row"
92+ :resource =" resource"
93+ :adminUser =" coreStore.adminUser"
94+ :meta =" tableRowReplaceInjection ? tableRowReplaceInjection.meta : undefined"
95+ @click =" onClick($event, row)"
96+ ref =" rowRefs"
97+ class =" list-table-body-row bg-lightListTable dark:bg-darkListTable border-lightListBorder dark:border-gray-700 hover:bg-lightListTableRowHover dark:hover:bg-darkListTableRowHover"
98+ :class =" {'border-b': rowI !== rows.length - 1, 'cursor-pointer': row._clickUrl !== null}"
99+ >
93100 <td class =" w-4 p-4 cursor-default sticky-column bg-lightListTable dark:bg-darkListTable" @click =" (e)=>e.stopPropagation()" >
94101 <Checkbox
95102 :model-value =" checkboxesInternal.includes(row._primaryKeyValue)"
210217 </div >
211218
212219 </td >
213- </ tr >
220+ </ component >
214221 </tbody >
215222 </table >
216223 </div >
@@ -345,6 +352,7 @@ const props = defineProps<{
345352 noRoundings? : boolean ,
346353 customActionsInjection? : any [],
347354 tableBodyStartInjection? : any [],
355+ tableRowReplaceInjection? : any ,
348356}>();
349357
350358// emits, update page
Original file line number Diff line number Diff line change @@ -377,6 +377,7 @@ const props = defineProps<{
377377 containerHeight? : number ,
378378 itemHeight? : number ,
379379 bufferSize? : number ,
380+ tableRowReplaceInjection? : any
380381}>();
381382
382383// emits, update page
You can’t perform that action at this time.
0 commit comments