Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add custom page size select? #284

Open
ghost opened this issue Jun 30, 2020 · 2 comments
Open

How to add custom page size select? #284

ghost opened this issue Jun 30, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Jun 30, 2020

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.

@Joshuafolorunsho
Copy link

Joshuafolorunsho commented Dec 6, 2021

Any solution for this yet?

@iamyuu
Copy link

iamyuu commented Apr 11, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants