pagination icon indicating copy to clipboard operation
pagination copied to clipboard

How to add custom page size select?

Open ghost opened this issue 4 years ago • 2 comments

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.

ghost avatar Jun 30 '20 15:06 ghost

Any solution for this yet?

Joshuafolorunsho avatar Dec 06 '21 13:12 Joshuafolorunsho

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} />

iamyuu avatar Apr 11 '22 06:04 iamyuu