react-component / collapse

React Collapse / Accordion
http://react-component.github.io/collapse/
MIT License
324 stars 134 forks source link

feat: add icon to collapsible #232

Closed Sheepeer closed 2 years ago

Sheepeer commented 2 years ago

What I did: Add choice "icon" to "collapsible", which could be "header" or "disabled".

Why I want to do so: There's a scene that I want to use Collapse to place checkbox group, the first level of checkbox should be placed as Collapse's header. But when the checkbox checked, the collapse will change it's state. The method I fix this at that time was use e.stopPropagation(), which is not grace. This situation is common. So I think add choice "icon" to "collapsible" is nessesary.😀

vercel[bot] commented 2 years ago

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

Name Status Preview Updated
collapse ✅ Ready (Inspect) Visit Preview Sep 1, 2022 at 11:27AM (UTC)
codecov[bot] commented 2 years ago

Codecov Report

Merging #232 (771f1b4) into master (ca1476f) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #232      +/-   ##
==========================================
+ Coverage   98.33%   98.34%   +0.01%     
==========================================
  Files           4        4              
  Lines         120      121       +1     
  Branches       36       36              
==========================================
+ Hits          118      119       +1     
  Misses          2        2              
Impacted Files Coverage Δ
src/Collapse.tsx 100.00% <ø> (ø)
src/Panel.tsx 97.61% <100.00%> (+0.05%) :arrow_up:

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

afc163 commented 2 years ago

冲突

Sheepeer commented 2 years ago

冲突

解决啦 @afc163

afc163 commented 2 years ago

https://github.com/ant-design/ant-design/issues/37379

afc163 commented 2 years ago

@Sheepeer https://github.com/react-component/collapse/releases/tag/v3.4.0

还需要给 antd feature 分支发个 PR。

Sheepeer commented 2 years ago

@Sheepeer https://github.com/react-component/collapse/releases/tag/v3.4.0

还需要给 antd feature 分支发个 PR。

https://github.com/ant-design/ant-design/pull/37419 已加~