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

Setting header impossible for the expandIcon-s column #25165

Open
2 tasks done
gitact opened this issue Jun 22, 2020 · 5 comments
Open
2 tasks done

Setting header impossible for the expandIcon-s column #25165

gitact opened this issue Jun 22, 2020 · 5 comments

Comments

@gitact
Copy link

gitact commented Jun 22, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox
(https://codesandbox.io/s/l2rdq)

Steps to reproduce

open link above (or see on the official documentation [https://ant.design/components/table/#components-table-demo-expand] ). And note that first special "[ ] column" hasn't any header.

What is expected?

When designing an "AntD Table expandable" following API on [https://ant.design/components/table/#components-table-demo-expand]
i get a PLUS [ ] icon-button drawn beside the row i want to expand the details for (following the API props like expandable={{expandedRowRender: .... }}
The icon-buttons are put in an autonomous column: i would like customize the column with an explicative ad-hoc Header!

What is actually happening?

AntD doesn't provide APIs for customizing the column with an explicative ad-hoc Header (like EXPAND FOR DETAILS)

A terrible (and graphic) solution could be seen with a Header DETAILS on
https://codesandbox.io/s/sleepy-hermann-up8qf?file=/index.css:0-83
with an ad-hoc CSS, lacking of elegance and scalability and dangerously connected to the current inner architecture...but you can see the graphic result and test better solutions thanks to CodeSandBox.

Environment Info
antd 4.3.4
React 16.13.1a
System windows 10
Browser chrome 83

What does the proposed API look like?

AntD doesn't provide APIs for customizing the column with an explicative ad-hoc Header (like EXPAND FOR DETAILS)

Similarly to
expandIcon Customize row expand Icon. Ref example Function(props):ReactNode -
and coherent to naming like expandIconColumnIndex, I would propose

expandIconColumnHeader	Customize expand Icons column header.	Function(props):ReactNode

See also https://codesandbox.io/s/sleepy-hermann-up8qf?file=/index.css:0-83

@Cpt76
Copy link

Cpt76 commented Jun 26, 2020

I fully agree with the proposal.

@angelo24782
Copy link

I searched for the same problem,
cause i wanted to open an issue about it UP for it
Very annoying also for my project. it's a kinda BUG !

@pleshevskiy
Copy link

The same problem

@gitact
Copy link
Author

gitact commented Jul 21, 2020

Any news about from ANT DESIGN TEAM?
@AntDesigners @ant-design-bot
We feel very forgotten :-(

@fangyuan-airwallex
Copy link

Agree with the proposal +1

Also it is possible to customize expanded inner table style, e.g. I don't want inner table indentation and I need overwrite style by myself

.ant-table-tbody > tr > td > .ant-table-wrapper:only-child .ant-table {
    margin: -16px -16px -16px 33px;
}

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

No branches or pull requests

7 participants