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

fix(Pagination): add selectComponentClass prop type #7890

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

werheng
Copy link

@werheng werheng commented Oct 25, 2024

Pagination 组件的 selectComponentClass 属性实际上可以是一个具体的组件,类似于 MiniSelect 或者 MiddleSelect,可以用于替换条数选择器的 Select 组件使其更易扩展,但是目前 selectComponentClass 被限制为 String 类型,希望能再增加 Object 的类型。

const paginationProps = {
  ...restProps,
  ...getIconsProps(prefixCls.value),
  prefixCls: prefixCls.value,
  selectPrefixCls: selectPrefixCls.value,
  selectComponentClass: selectComponentClass || (isSmall ? MiniSelect : MiddleSelect),
  locale: locale.value,
  buildOptionText,
  ...attrs,
  class: classNames(
    {
      [`${prefixCls.value}-mini`]: isSmall,
      [`${prefixCls.value}-rtl`]: direction.value === 'rtl',
    },
    attrs.class,
    hashId.value,
  ),
  itemRender,
};

Copy link

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the Stale label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant