Skip to content

Commit

Permalink
Refactor #6683 - For TreeTable
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Oct 30, 2024
1 parent d93ee94 commit e09e9ea
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 8 deletions.
20 changes: 12 additions & 8 deletions packages/primevue/src/treetable/TreeTable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -658,14 +658,6 @@ export interface TreeTableSlots {
* Custom footer template.
*/
footer(): VNode[];
/**
* Custom paginator start template.
*/
paginatorstart(): VNode[];
/**
* Custom paginator end template.
*/
paginatorend(): VNode[];
/**
* Custom empty template.
*/
Expand All @@ -678,6 +670,18 @@ export interface TreeTableSlots {
* Custom checkbox icon template.
*/
checkboxicon(): VNode[];
/**
* Custom paginator container template.
*/
paginatorcontainer(): VNode[];
/**
* Custom paginator start template.
*/
paginatorstart(): VNode[];
/**
* Custom paginator end template.
*/
paginatorend(): VNode[];
/**
* Custom paginator first page link icon template.
*/
Expand Down
32 changes: 32 additions & 0 deletions packages/primevue/src/treetable/TreeTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@
:unstyled="unstyled"
:pt="ptm('pcPaginator')"
>
<template v-if="$slots.paginatorcontainer" #container="slotProps">
<slot
name="paginatorcontainer"
:first="slotProps.first"
:last="slotProps.last"
:rows="slotProps.rows"
:page="slotProps.page"
:pageCount="slotProps.pageCount"
:totalRecords="slotProps.totalRecords"
:firstPageCallback="slotProps.firstPageCallback"
:lastPageCallback="slotProps.lastPageCallback"
:prevPageCallback="slotProps.prevPageCallback"
:nextPageCallback="slotProps.nextPageCallback"
:rowChangeCallback="slotProps.rowChangeCallback"
></slot>
</template>
<template v-if="$slots.paginatorstart" #start>
<slot name="paginatorstart"></slot>
</template>
Expand Down Expand Up @@ -138,6 +154,22 @@
:unstyled="unstyled"
:pt="ptm('pcPaginator')"
>
<template v-if="$slots.paginatorcontainer" #container="slotProps">
<slot
name="paginatorcontainer"
:first="slotProps.first"
:last="slotProps.last"
:rows="slotProps.rows"
:page="slotProps.page"
:pageCount="slotProps.pageCount"
:totalRecords="slotProps.totalRecords"
:firstPageCallback="slotProps.firstPageCallback"
:lastPageCallback="slotProps.lastPageCallback"
:prevPageCallback="slotProps.prevPageCallback"
:nextPageCallback="slotProps.nextPageCallback"
:rowChangeCallback="slotProps.rowChangeCallback"
></slot>
</template>
<template v-if="$slots.paginatorstart" #start>
<slot name="paginatorstart"></slot>
</template>
Expand Down

0 comments on commit e09e9ea

Please sign in to comment.