Pagination Template 2 not working for paginationTemplate

UI Components for React
Post Reply
JunkRat111
Posts: 1
Joined: 06 May 2021, 20:07

06 May 2021, 20:16

Below is the error message I am receiving. I am wondering why the options: any does not apply for the paginatorTemplate and where to place the missing properties for paginatorTemplateOptions

Thank you!


TypeScript error in /Users/mstapleton/git/internal-spikes/mvx-datatable/src/Libraries/PrimeReactDataTable.tsx(250,15):
No overload matches this call.
Overload 1 of 2, '(props: DataTableProps | Readonly<DataTableProps>): DataTable', gave the following error.
Type '{ layout: string; RowsPerPageDropdown: (options: any) => Element; CurrentPageReport: (options: any) => Element; }' is not assignable to type 'PaginatorTemplate'.
Type '{ layout: string; RowsPerPageDropdown: (options: any) => Element; CurrentPageReport: (options: any) => Element; }' is missing the following properties from type 'PaginatorTemplateOptions': FirstPageLink, PrevPageLink, PageLinks, NextPageLink, LastPageLink
Overload 2 of 2, '(props: DataTableProps, context: any): DataTable', gave the following error.
Type '{ layout: string; RowsPerPageDropdown: (options: any) => Element; CurrentPageReport: (options: any) => Element; }' is not assignable to type 'PaginatorTemplate'.
Type '{ layout: string; RowsPerPageDropdown: (options: any) => Element; CurrentPageReport: (options: any) => Element; }' is not assignable to type 'PaginatorTemplateOptions'. TS2769

248 | resizableColumns columnResizeMode="fit"
249 | paginator
> 250 | paginatorTemplate = {template2}
| ^
251 | first={first2}
252 | rows={rows2}
253 | onPage={onCustomPage2}

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

07 May 2021, 01:47

Hi,

Which PrimeReact version are you using?

Best Regards,

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 11 guests