From 447773073a35b18c79cd0a1a739c35986882f5e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Thu, 13 Jul 2023 15:22:16 +0300 Subject: [PATCH] Paginator updates for DataView --- components/lib/dataview/BaseDataView.vue | 3 +-- components/lib/dataview/DataView.vue | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/components/lib/dataview/BaseDataView.vue b/components/lib/dataview/BaseDataView.vue index 724edca53..92d6e998d 100644 --- a/components/lib/dataview/BaseDataView.vue +++ b/components/lib/dataview/BaseDataView.vue @@ -10,12 +10,11 @@ const classes = { } ], header: 'p-dataview-header', - paginatorTop: ({ instance }) => [{ 'p-paginator-top': instance.paginatorTop }], + paginator: ({ instance }) => (instance.paginatorTop ? 'p-paginator-top' : instance.paginatorBottom ? 'p-paginator-bottom' : ''), content: 'p-dataview-content', grid: 'p-grid p-nogutter grid grid-nogutter', column: 'p-col col', emptyMessage: 'p-dataview-emptymessage', - paginatorBottom: ({ instance }) => [{ 'p-paginator-bottom': instance.paginatorBottom }], footer: 'p-dataview-footer' }; diff --git a/components/lib/dataview/DataView.vue b/components/lib/dataview/DataView.vue index 704bb83e6..5061cf48a 100755 --- a/components/lib/dataview/DataView.vue +++ b/components/lib/dataview/DataView.vue @@ -12,7 +12,7 @@ :template="paginatorTemplate" :rowsPerPageOptions="rowsPerPageOptions" :currentPageReportTemplate="currentPageReportTemplate" - :class="cx('paginatorTop')" + :class="cx('paginator')" :alwaysShow="alwaysShowPaginator" @page="onPage($event)" :unstyled="unstyled" @@ -47,11 +47,11 @@ :template="paginatorTemplate" :rowsPerPageOptions="rowsPerPageOptions" :currentPageReportTemplate="currentPageReportTemplate" - :class="cx('paginatorBottom')" + :class="cx('paginator')" :alwaysShow="alwaysShowPaginator" @page="onPage($event)" :unstyled="unstyled" - :pt="ptm('root')" + :pt="ptm('paginator')" >