diff --git a/README.md b/README.md index efc21403..fed1a536 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ ReactDOM.render(, container); | showSizeChanger | show pageSize changer | Bool | `false` when total less then `totalBoundaryShowSizeChanger`, `true` when otherwise | | totalBoundaryShowSizeChanger | when total larger than it, `showSizeChanger` will be true | number | 50 | | pageSizeOptions | specify the sizeChanger selections | Array | ['10', '20', '50', '100'] | +| showSizeOptionsSearch | show the pageSizeOptions Select component search | Bool | Default value is `false`. `false` when pageSizeOptions Select component disabled the showSearch, `true` when pageSizeOptions Select component enabled the showSearch | | onShowSizeChange | pageSize change callback | Function(current, size) | - | | hideOnSinglePage | hide on single page | Bool | false | | showPrevNextJumpers | show jump-prev, jump-next | Bool | true | diff --git a/docs/examples/jumper.tsx b/docs/examples/jumper.tsx index 182c195b..af5273dc 100644 --- a/docs/examples/jumper.tsx +++ b/docs/examples/jumper.tsx @@ -50,6 +50,7 @@ const App = () => ( total={8} />
+

Page options showSizeOptionsSearch is enabled

( onChange={onChange} pageSize={10} total={8} + showSizeOptionsSearch={true} /> ); diff --git a/src/Options.tsx b/src/Options.tsx index 99733aaf..3f1bfbb2 100644 --- a/src/Options.tsx +++ b/src/Options.tsx @@ -25,6 +25,7 @@ interface OptionsProps { selectComponentClass: React.ComponentType> & { Option?: React.ComponentType>; }; + showSizeOptionsSearch?: boolean; } const defaultPageSizeOptions = ['10', '20', '50', '100']; @@ -42,6 +43,7 @@ const Options: React.FC = (props) => { selectPrefixCls, disabled, buildOptionText, + showSizeOptionsSearch } = props; const [goInputText, setGoInputText] = React.useState(''); @@ -128,7 +130,7 @@ const Options: React.FC = (props) => {