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组件增加属性作用于额外展开行 #6896

Closed
zhangchao828 opened this issue Jul 19, 2017 · 6 comments
Closed

Comments

@zhangchao828
Copy link

What problem does this feature solve?

Table组件的expandedRowRender属性用来显示额外的展开行来描诉额外信息,此时是否可以多个属性来隐藏最前面的点击展开的那个 号,然后再多个属性来控制额外信息的位置(在行的上面或者下面)

What does the proposed API look like?

expandedPosition="top"和 showExpanedOperation={false}属性来控制如下图展示

9fbcaaad-6821-4ede-b7c9-a705b940ff2a

@ant-design-bot
Copy link
Contributor

It will be better to write your issue/comment in English, so more people can understand you.
And this means that more people can help you or benefit from your issue/comment.
See: #4897

@yesmeck
Copy link
Member

yesmeck commented Jul 19, 2017

你这个看起来就是合并列。

@zhangchao828
Copy link
Author

@yesmeck 合并列的话第一写起来麻烦,第二这是一行中数据要拆成两行来显示,上面一行合并列,就是非常麻烦,如果能用展开行来做的话会简便很多

@afc163
Copy link
Member

afc163 commented Jul 19, 2017

建议使用合并列来做。

@yesmeck
Copy link
Member

yesmeck commented Mar 26, 2018

目前可以用 custom element 来实现 https://codesandbox.io/s/v8ymrynm6y

Custom element 里拿不到行数据,感觉还要加一个 rowRender:

<Table 
  columns={columns} 
  dataSource={data}
  rowRender={({ record, index, Row }) => {
    return (
      <Fragment>
	    <tr>
	      <td colSpan="4">No: 12345</td>
	    </tr>
        <Row />
      </Fragment>
    );
  }}
/>

@yesmeck
Copy link
Member

yesmeck commented Apr 13, 2018

用自定义 components 实现的例子: https://codesandbox.io/s/xo4j1qk044

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

4 participants