File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import * as React from 'react' ;
2+ import { PrimeReactContext , localeOption } from '../api/Api' ;
3+ import { ariaLabel } from '../api/Locale' ;
4+
5+ import { useMergeProps } from '../hooks/Hooks' ;
6+ import { ObjectUtils } from '../utils/Utils' ;
7+ import { RowsPerPageDropdownBase } from './PaginatorBase' ;
8+
9+ export const CustomOption = React . memo ( ( inProps ) => {
10+ const mergeProps = useMergeProps ( ) ;
11+ const context = React . useContext ( PrimeReactContext ) ;
12+ const props = RowsPerPageDropdownBase . getProps ( inProps , context ) ;
13+
14+ const value = props . totalPages > 0 ? props . page + 1 : 0 ;
15+ const element = null ;
16+
17+ if ( props . template ) {
18+ const defaultOptions = {
19+ value,
20+ //onChange: onChange,
21+ disabled : props . disabled ,
22+ className : 'p-paginator-page-input' ,
23+
24+ element,
25+ props
26+ } ;
27+
28+ return ObjectUtils . getJSXElement ( props . template , defaultOptions ) ;
29+ }
30+
31+ return element ;
32+ } ) ;
33+
34+ CustomOption . displayName = 'CustomOption' ;
You can’t perform that action at this time.
0 commit comments