Skip to content

feat: support expand all control in expandable column header - #1505

Draft
nikzanda wants to merge 1 commit into
react-component:masterfrom
nikzanda:feat/expand-all-header
Draft

feat: support expand all control in expandable column header#1505
nikzanda wants to merge 1 commit into
react-component:masterfrom
nikzanda:feat/expand-all-header

Conversation

@nikzanda

Copy link
Copy Markdown

Summary

Add an opt-in expand/collapse-all control to the expandable column header.

This is intended to support the use case described in ant-design/ant-design#8791.

The PR is opened as a draft to confirm the API shape before preparing the corresponding Ant Design integration.

API

  • Add expandable.showExpandAll to enable the header control.
  • Add expandable.expandAllIcon to customize its rendering.
  • Add expandable.onExpandAll to observe expand/collapse-all actions.
  • Allow expandable.columnTitle to be a render function receiving the generated expand-all control.

Behavior

  • The feature is disabled by default.
  • Only rows allowed by rowExpandable are affected.
  • Controlled and uncontrolled expandedRowKeys are supported.
  • Existing unrelated expanded keys are preserved.
  • Both the default and custom expand-all icons are supported.
  • The control is currently limited to expandedRowRender tables.

Testing

Added regression coverage for:

  • opt-in rendering
  • expanding and collapsing all rows
  • rowExpandable filtering
  • controlled expandedRowKeys
  • preservation of unrelated expanded keys
  • custom expandAllIcon
  • composition through columnTitle

Validation:

  • yarn test tests/ExpandRow.spec.jsx
  • yarn tsc
  • yarn lint

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

@nikzanda is attempting to deploy a commit to the afc163's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e295d975-d9ce-476f-9685-6ac097f49061

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nikzanda

Copy link
Copy Markdown
Author

@afc163, when you have time, could you please take a quick look at the proposed API (showExpandAll, expandAllIcon, onExpandAll, and the columnTitle render function)?

I opened this as a draft to confirm the API direction before preparing the corresponding Ant Design integration for ant-design/ant-design#8791. Thanks!

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

Successfully merging this pull request may close these issues.

1 participant