Skip to content

feat: checkable support - #184

Merged
zombieJ merged 55 commits into
masterfrom
tree-select
Aug 26, 2021
Merged

feat: checkable support#184
zombieJ merged 55 commits into
masterfrom
tree-select

Conversation

@zombieJ

@zombieJ zombieJ commented Aug 26, 2021

Copy link
Copy Markdown
Member

rc-cascader is much like rc-tree-select but API is very different.
It's caused that component developer is not same person
and we do not rice the API naming standard at that time.

To avoid breaking change, wrap the rc-tree-select to compatible with rc-cascader API.
This should be better to merge to same API like rc-tree-select or rc-select in next major version.

Update:

  • dropdown class change to rc-cascader-dropdown
  • direction rtl keyboard

Deprecated:

  • popupVisible
  • onPopupVisibleChange

Removed:

  • builtinPlacements: Handle by select
  • hidePopupOnSelect

Note

#176 is no need anymore. Removed.

Preview

https://cascader-git-tree-select-react-component.vercel.app/demo/debug

@zombieJ
zombieJ requested a review from afc163 August 26, 2021 08:01
@codecov

codecov Bot commented Aug 26, 2021

Copy link
Copy Markdown

Codecov Report

Merging #184 (224b1c2) into master (04c4655) will increase coverage by 6.72%.
The diff coverage is 99.68%.

❗ Current head 224b1c2 differs from pull request most recent head 9711e8b. Consider uploading reports for the commit 9711e8b to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #184      +/-   ##
==========================================
+ Coverage   92.96%   99.68%   +6.72%     
==========================================
  Files           4        9       +5     
  Lines         270      321      +51     
  Branches       94       83      -11     
==========================================
+ Hits          251      320      +69     
+ Misses         19        1      -18     
Impacted Files Coverage Δ
src/OptionList/index.tsx 99.24% <99.24%> (ø)
src/Cascader.tsx 100.00% <100.00%> (+5.55%) ⬆️
src/OptionList/Checkbox.tsx 100.00% <100.00%> (ø)
src/OptionList/Column.tsx 100.00% <100.00%> (ø)
src/context.ts 100.00% <100.00%> (ø)
src/hooks/useSearchConfig.ts 100.00% <100.00%> (ø)
src/hooks/useSearchResult.ts 100.00% <100.00%> (ø)
src/hooks/useUpdateEffect.ts 100.00% <100.00%> (ø)
src/util.ts 100.00% <100.00%> (ø)
... and 7 more

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 04c4655...9711e8b. Read the comment docs.

@vercel

vercel Bot commented Aug 26, 2021

Copy link
Copy Markdown

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/cascader/82oj6UkyppcvS4q6c8iJk4HZezsf
✅ Preview: https://cascader-git-tree-select-react-component.vercel.app

@afc163

afc163 commented Aug 26, 2021

Copy link
Copy Markdown
Member

feat: checkable support 是什么意思?

@afc163

afc163 commented Aug 26, 2021

Copy link
Copy Markdown
Member

好像原来就没有 popupVisibleAfterSelect

@zombieJ

zombieJ commented Aug 26, 2021

Copy link
Copy Markdown
Member Author

checkable 就是 multiple,和 Tree & TreeSelect 保持一致允许自定义 checkbox,到 antd 里封装后作为 multiple 透出。

popupVisibleAfterSelect 是新增的:33000cb

@afc163

afc163 commented Aug 26, 2021

Copy link
Copy Markdown
Member

改名成 hidePopupOnSelect 了。

@zombieJ

zombieJ commented Aug 26, 2021

Copy link
Copy Markdown
Member Author

👌 ,我改一下名字……反正意思就是内嵌了,不用再透出来额外一个属性了。

@afc163

afc163 commented Aug 26, 2021

Copy link
Copy Markdown
Member

hidePopupOnSelect 现在这个需求怎么满足呢?

@zombieJ

zombieJ commented Aug 26, 2021

Copy link
Copy Markdown
Member Author

hidePopupOnSelect 本身是为了上游封装实现多选,现在已经自带多选了…………

ref: #176

@afc163

afc163 commented Aug 26, 2021

Copy link
Copy Markdown
Member

删了,他自己的封装岂不是就挂了。

@zombieJ

zombieJ commented Aug 26, 2021

Copy link
Copy Markdown
Member Author

发大版本,不影响的

@afc163

afc163 commented Aug 26, 2021

Copy link
Copy Markdown
Member

antd 上层是否有透传?

@zombieJ

zombieJ commented Aug 26, 2021

Copy link
Copy Markdown
Member Author

antd 用的 1.4.0 版本,没上过~

@zombieJ
zombieJ merged commit fdb2c3d into master Aug 26, 2021
@zombieJ
zombieJ deleted the tree-select branch August 26, 2021 09:12
@crazyair crazyair mentioned this pull request Apr 9, 2024
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