Skip to content

Conversation

dashaowang
Copy link
Contributor

修复内容:修复表格在所有列全是左固定时,会出现横向滚动条。详情见36330
修改内容:bodyContext增加属性allColumnsFixedLeft用于在渲染表格时判断是否取消该单元格的shadow

@vercel
Copy link

vercel bot commented Jul 14, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
table ✅ Ready (Inspect) Visit Preview Jul 15, 2022 at 2:52AM (UTC)

@codecov
Copy link

codecov bot commented Jul 14, 2022

Codecov Report

Merging #847 (df6222c) into master (b8e82d2) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head df6222c differs from pull request most recent head 2569a96. Consider uploading reports for the commit 2569a96 to get more accurate results

@@           Coverage Diff           @@
##           master     #847   +/-   ##
=======================================
  Coverage   99.39%   99.39%           
=======================================
  Files          36       36           
  Lines         984      987    +3     
  Branches      295      296    +1     
=======================================
+ Hits          978      981    +3     
  Misses          6        6           
Impacted Files Coverage Δ
src/context/BodyContext.tsx 100.00% <ø> (ø)
src/Cell/index.tsx 99.09% <100.00%> (+0.01%) ⬆️
src/Table.tsx 99.19% <100.00%> (+<0.01%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more


const perfRecord = React.useContext(PerfContext);
const supportSticky = React.useContext(StickyContext);
const { allColumnsFixedLeft } = React.useContext(BodyContext);
Copy link
Member

@afc163 afc163 Jul 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

逻辑上改成 allColumnsFixed 如何,这样还能支持都是右固定的情况。

Copy link
Contributor Author

@dashaowang dashaowang Jul 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

大佬你好 ,我目前看到的现象是对于属性lastFixRight,计算条件只有direction === 'rtl',并且当前列的下一列不为fixed='right'时才是true。所以对于全部右固定的情况,计算出的lastFixRight也是false。其实不会有问题的。
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allColumnsFixedLeft 在结果上是不是等于 firstFixLeft && lastFixLeft

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
实际的测试结果上不是的

[`${cellPrefixCls}-fix-left`]: isFixLeft && supportSticky,
[`${cellPrefixCls}-fix-left-first`]: firstFixLeft && supportSticky,
[`${cellPrefixCls}-fix-left-last`]: lastFixLeft && supportSticky,
[`${cellPrefixCls}-all-fix-left`]: lastFixLeft && allColumnsFixedLeft && supportSticky,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

${cellPrefixCls}-fix-left-all 这样统一一点。

@afc163
Copy link
Member

afc163 commented Jul 15, 2022

7.25.2 已发。还需要去 antd 仓库提交一个新的 PR 补 css。

@zombieJ
Copy link
Member

zombieJ commented Jul 15, 2022

这个应该发个 minor,patch 把新的 cls 也带上了:
截屏2022-07-15 上午11 38 21

@afc163
Copy link
Member

afc163 commented Jul 15, 2022

@zombieJ 确实,不过对 antd 现有版本应该没影响。我回滚掉,还是直接更新 snapshot?

@zombieJ
Copy link
Member

zombieJ commented Jul 15, 2022

我更新一下 snapshot 即可~~

@dashaowang
Copy link
Contributor Author

7.25.2 已发。还需要去 antd 仓库提交一个新的 PR 补 css。

大佬 这个pr需要我去提吗

@afc163
Copy link
Member

afc163 commented Jul 18, 2022

@dashaowang 需要

@dashaowang
Copy link
Contributor Author

@dashaowang 需要

我看应该是更新rc-table版本就可以吧

@afc163
Copy link
Member

afc163 commented Jul 20, 2022

还有样式要补。

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

Successfully merging this pull request may close these issues.

3 participants