Skip to content

Conversation

yoyo837
Copy link
Member

@yoyo837 yoyo837 commented Mar 9, 2020

修复当,外围存在一些逻辑操作columus时如reduce, 会对无效的group 识别为group, 导致列头无法显示(均为空group)

动态组装的columus 肯定会声明column 的children, 比如 {

children: xxx ? yyy : nnn
}

但是代码中使用的in 操作符,会识别为column group

@vercel
Copy link

vercel bot commented Mar 9, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/react-component/table/br8u1su60
✅ Preview: https://table-git-fork-yoyo837-fix-table-columns-children-falsy.react-component.now.sh

@codecov
Copy link

codecov bot commented Mar 9, 2020

Codecov Report

Merging #430 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #430   +/-   ##
=======================================
  Coverage   99.84%   99.84%           
=======================================
  Files          21       21           
  Lines         638      638           
  Branches      182      182           
=======================================
  Hits          637      637           
  Misses          1        1
Impacted Files Coverage Δ
src/Header/Header.tsx 100% <100%> (ø) ⬆️
src/hooks/useColumns.tsx 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4325f07...020c162. Read the comment docs.

@afc163

This comment has been minimized.

@yoyo837
Copy link
Member Author

yoyo837 commented Mar 9, 2020

3.x 可以这么玩。

我只是看同不同意改,不行我就自己delete 一下。

@yoyo837
Copy link
Member Author

yoyo837 commented Mar 9, 2020

非“表格树形数据”的场景是不是可以允许这样好一些?

而且“表格树形数据” 主要是dataSource里相关,跟columns 或者 header 应该不影响。

@zombieJ
Copy link
Member

zombieJ commented Mar 9, 2020

两个不是一件事情,一个是 column 的 children,一个是 nest data 的 children。这个可以改。

另外,不用 columnAlias ,直接代码里 as 就行了。减少尺寸。

@zombieJ zombieJ merged commit c2a49ed into react-component:master Mar 9, 2020
@zombieJ
Copy link
Member

zombieJ commented Mar 9, 2020

+ rc-table@7.3.3

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