File tree Expand file tree Collapse file tree 6 files changed +3598
-1036
lines changed Expand file tree Collapse file tree 6 files changed +3598
-1036
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,18 @@ export default () => {
3232 showSizeChanger
3333 selectComponentClass = { Select }
3434 />
35+ < hr />
36+ < a href = "https://github.com/ant-design/ant-design/issues/46671" >
37+ Antd #46671
38+ </ a >
39+ < Pagination
40+ simple
41+ defaultCurrent = { 1 }
42+ total = { 50 }
43+ showSizeChanger
44+ showQuickJumper
45+ selectComponentClass = { Select }
46+ />
3547 </ >
3648 ) ;
3749} ;
Original file line number Diff line number Diff line change @@ -348,27 +348,32 @@ const Pagination: React.FC<PaginationProps> = (props) => {
348348 let simplePager : React . ReactNode = null ;
349349
350350 if ( simple ) {
351- if ( typeof goButton === 'boolean' ) {
351+ // ====== Simple quick jump ======
352+ if ( goButton ) {
353+ if ( typeof goButton === 'boolean' ) {
354+ gotoButton = (
355+ < button type = "button" onClick = { handleGoTO } onKeyUp = { handleGoTO } >
356+ { locale . jump_to_confirm }
357+ </ button >
358+ ) ;
359+ } else {
360+ gotoButton = (
361+ < span onClick = { handleGoTO } onKeyUp = { handleGoTO } >
362+ { goButton }
363+ </ span >
364+ ) ;
365+ }
366+
352367 gotoButton = (
353- < button type = "button" onClick = { handleGoTO } onKeyUp = { handleGoTO } >
354- { locale . jump_to_confirm }
355- </ button >
368+ < li
369+ title = { showTitle ? `${ locale . jump_to } ${ current } /${ allPages } ` : null }
370+ className = { `${ prefixCls } -simple-pager` }
371+ >
372+ { gotoButton }
373+ </ li >
356374 ) ;
357- } else {
358- < span onClick = { handleGoTO } onKeyUp = { handleGoTO } >
359- { goButton }
360- </ span > ;
361375 }
362376
363- gotoButton = (
364- < li
365- title = { showTitle ? `${ locale . jump_to } ${ current } /${ allPages } ` : null }
366- className = { `${ prefixCls } -simple-pager` }
367- >
368- { gotoButton }
369- </ li >
370- ) ;
371-
372377 simplePager = (
373378 < li
374379 title = { showTitle ? `${ current } /${ allPages } ` : null }
You can’t perform that action at this time.
0 commit comments