ant-design Format(i18n) pagination total number

41zrol4v  于 3个月前  发布在  其他
关注(0)|答案(2)|浏览(62)

What problem does this feature solve?

When there is a page count <999 the number is not formatted. i.e. 1000 not 1,000

What does the proposed API look like?

pagination={{total: total, displayTotal: <>{Intl.NumberFormat('en-US').format(total)}</>}}

https://codesandbox.io/p/sandbox/jolly-hofstadter-59qjxn?file=%2Fsrc%2FApp.js%3A17%2C2

bzzcjhmw

bzzcjhmw1#

Could you provide more detail? I couldn't unterstand what you mean by this reproduction.
Do you demand to render custom total pages?

0yycz8jy

0yycz8jy2#

Yes, exactly. Render a custom total pages. Ideally each page number would be format-able without having to create a custom pagination component:

This should be the default behavior: 9,997 9,998 9,999 10,000

相关问题