File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,15 @@ export interface PaginatorProps {
22
22
* Called when the current page is changed.
23
23
*/
24
24
onChange ?( page : number ) : void
25
+
26
+ /**
27
+ * Customize the maxLength prop of the paginator input.
28
+ */
29
+ maxLength ?: number
25
30
}
26
31
27
32
export function Paginator ( props : PaginatorProps ) {
28
- const { page, total, onChange } = props
33
+ const { page, total, onChange, maxLength } = props
29
34
const locale = useLocale ( )
30
35
31
36
const [ inputValue , setInputValue ] = useState < string > ( `${ page + 1 } ` )
@@ -86,7 +91,7 @@ export function Paginator(props: PaginatorProps) {
86
91
onBlur = { handleInputBlur }
87
92
onKeyDown = { handleInputKeyPress }
88
93
clearable = { false }
89
- maxLength = { 4 }
94
+ maxLength = { maxLength ?? 4 }
90
95
title = { locale . paginator . currentPage }
91
96
/>
92
97
You can’t perform that action at this time.
0 commit comments