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

chore: support collapsable、 remove disabled of panel and headerCollapsableOnly #173

Merged
merged 4 commits into from
Nov 16, 2020

Conversation

kerm1it
Copy link
Member

@kerm1it kerm1it commented Nov 16, 2020

API 改动

  • Collapse 与 Panel 添加 collapsible 属性,取值为 boolean'header',默认为 undefined 即为 true
    • true 时,Panel 的 header 所有区域均可点击触发展开行为
    • false 时,相当于给所有的 Panel 子元素设置了 disabled 属性,header 区域不可点击,样式与之前的 disabled 时相同
    • header 时,只有点击 Panel 的 header 中的文字区域时才可触发展开行为,点击箭头 icon等不会触发

当 Collapse 与 Panel 同时有 collapsible 时,优先读取 Panel 的值。

  • 删除 2.1.0 中的 headerCollapsableOnly 属性
  • 删除 Panel 中的 disabled 属性,使用 collapsible=false 代替

@vercel
Copy link

vercel bot commented Nov 16, 2020

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

🔍 Inspect: https://vercel.com/react-component/collapse/3rhcouc5f
✅ Preview: https://collapse-git-feat-collapsable.react-component.vercel.app

@codecov
Copy link

codecov bot commented Nov 16, 2020

Codecov Report

Merging #173 (53eedcb) into master (6b3502b) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #173      +/-   ##
==========================================
+ Coverage   99.02%   99.04%   +0.01%     
==========================================
  Files           4        4              
  Lines         103      105       +2     
  Branches       31       32       +1     
==========================================
+ Hits          102      104       +2     
  Misses          1        1              
Impacted Files Coverage Δ
src/Collapse.tsx 100.00% <100.00%> (ø)
src/Panel.tsx 96.77% <100.00%> (+0.10%) ⬆️

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 6b3502b...53eedcb. Read the comment docs.

README.md Outdated Show resolved Hide resolved
@zombieJ
Copy link
Member

zombieJ commented Nov 16, 2020

😝 是 collapsible 啦~

src/Collapse.tsx Outdated Show resolved Hide resolved
@zombieJ
Copy link
Member

zombieJ commented Nov 16, 2020

#174 合完后有几个冲突要修一下

@kerm1it
Copy link
Member Author

kerm1it commented Nov 16, 2020

冲突解决了,你看看有没有把哪个属性漏了

@zombieJ zombieJ merged commit be1a8a3 into master Nov 16, 2020
@delete-merged-branch delete-merged-branch bot deleted the feat-collapsable branch November 16, 2020 07:14
@zombieJ
Copy link
Member

zombieJ commented Nov 16, 2020

+ [email protected]

@zombieJ
Copy link
Member

zombieJ commented Nov 16, 2020

我在 antd 开一个 branch,我们俩一起搞~

@zombieJ
Copy link
Member

zombieJ commented Nov 16, 2020

@kerm1it
Copy link
Member Author

kerm1it commented Nov 16, 2020

ant-design/ant-design#27790

👌

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.

2 participants