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

[Table] Placement of "expandable row" is before children #31830

Open
1 task done
rashmimh opened this issue Aug 18, 2021 · 1 comment
Open
1 task done

[Table] Placement of "expandable row" is before children #31830

rashmimh opened this issue Aug 18, 2021 · 1 comment
Labels

Comments

@rashmimh
Copy link

rashmimh commented Aug 18, 2021

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

Reproduction link

Edit on CodeSandbox

Steps to reproduce

<Table
  columns={columns}
  dataSource={data}
  expandable={{
    rowExpandable: (record) => {
      console.log('record ', record);
      return record.children ? true : false;
    },
    expandIcon: ({ expanded, onExpand, record }) => {
      if(!record.children || record.children.length === 0) return null;
      return expanded ? (
        <DownOutlined onClick={e => onExpand(record, e)} />
      ) : (
        <RightOutlined onClick={e => onExpand(record, e)} />
      )			  
    },
    expandedRowRender: (record, index, indent, expanded) => {
      console.log(record, index, indent, expanded);
      return <Button>Save</Button>;
    }
  }}/>

What is expected?

Expandable row should be below children

What is actually happening?

Expandable row currently placed above record children

Environment Info
antd 4.6.5
React 16.12.0
System Mac
Browser Chrome 92.0.4515.131 (Official Build) (x86_64)

children

Raised question on stackoverflow: https://stackoverflow.com/questions/68826658/ant-design-table-need-to-place-expandable-row-before-parent-children

@rashmimh rashmimh changed the title Table expandable row rendering before children [Table] Placement of "expandable row" is before children Aug 18, 2021
@nikitowsky
Copy link

Any workaround?

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

No branches or pull requests

2 participants