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

pro-table的hideInTable BUG ,显示隐藏列引发顺序错误 #100

Closed
sumaoge opened this issue Aug 3, 2020 · 1 comment
Closed

pro-table的hideInTable BUG ,显示隐藏列引发顺序错误 #100

sumaoge opened this issue Aug 3, 2020 · 1 comment
Labels
⭕️ bug Something isn't working table

Comments

@sumaoge
Copy link

sumaoge commented Aug 3, 2020

[
    {
      title: 'A',
      dataIndex: 'a',
    },
{
      title: 'B',
      dataIndex: 'b',
       hideInTable: hideB
    },
{
      title: 'C',
      dataIndex: 'c',
     hideInTable:hideC
    },
]

如上,假设我1个表有多个列。 最后有2个列是默认隐藏的,
我通过动态改变 hideB或hideC 的值显示或隐藏B或C列。
当我显示B列或显示B和C列时,显示正常。
当我隐藏B列,显示C列时,C会跑到表格最前面去(预期是 A列,C列,实际是 C列,A列)

@chenshuai2144 chenshuai2144 transferred this issue from ant-design/ant-design-pro Aug 5, 2020
@chenshuai2144 chenshuai2144 added ⭕️ bug Something isn't working table labels Aug 5, 2020
@chenshuai2144
Copy link
Contributor

最好给每个列都设置一个 key,这样就不会发生这个 bug 了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭕️ bug Something isn't working table
Projects
None yet
Development

No branches or pull requests

2 participants