pagination
pagination copied to clipboard
How to add custom page size select?
I need to add custom page select. I don't wanna use rc-select
. Any other way to add page size selector? I've tried to add mine custom select component selectComponentClass={MyCustomSelect}
but it doesn't work.
Any solution for this yet?
It's works for me
function Select(props) {
// Select props:
// aria-label: "Page Size"
// children: (4) [{…}, {…}, {…}, {…}]
// className: "rc-pagination-options-size-changer"
// defaultOpen: false
// disabled: undefined
// dropdownMatchSelectWidth: false
// getPopupContainer: ƒ getPopupContainer(triggerNode)
// onChange: ƒ (value)
// optionLabelProp: "children"
// prefixCls: "rc-select"
// showSearch: false
// value: "50"
return <select {...props} />;
}
function Option(props) {
return <option {...props} />;
}
Select.Option = Option;
<RcPagination selectComponentClass={Select} {...restProps} />