react-component / table

React Table
https://table.react-component.now.sh
MIT License
1.29k stars 589 forks source link

Table expandable中的fixed设为'left'|'right', 页面报错 #755

Open horseson2018 opened 2 years ago

horseson2018 commented 2 years ago
image

例子:codesandbox

1.expandable的fixed设为string的时候,必须同时设置table的scroll.x,个人建议可以加个提示warning,现在页面直接崩溃了。

2.fixed设置为right的时候还必须同时设置expandIconColumnIndex为basecolumns的length,否则会不生效,个人认为用户在设置fixed为right的时候已经想好了就是要定在最右边,不应该还需要设置expandIconColumnIndex,并且目前这一点也没有提示

ps:以上两点包括antd的文档上也没有足够的说明 image

JunlinZhu-Tommy commented 2 years ago

这应该不是个需要说明的点,问题一应该是个bug。

horseson2018 commented 2 years ago

这应该不是个需要说明的点,问题一应该是个bug。

额,不说明谁能想到fixed: right还得设置index才能定在最右边,文档也没有例子,不看源码我甚至不知道解决方法。我觉得问题在于为什么要同时设置expandIconColumnIndex和fixed才能生效,是为了解决什么边缘问题吗?可能确实是我考虑不周,请大佬指点一下😂