Skip to content

fix: show selected parent whose children were all disabled #395

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

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

MadCcc
Copy link
Member

@MadCcc MadCcc commented Jan 4, 2022

@vercel
Copy link

vercel bot commented Jan 4, 2022

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

@codecov
Copy link

codecov bot commented Jan 4, 2022

Codecov Report

Merging #395 (e67be80) into master (b0a5b4e) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #395   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           14        14           
  Lines          463       462    -1     
  Branches       123       123           
=========================================
- Hits           463       462    -1     
Impacted Files Coverage Δ
src/utils/strategyUtil.ts 100.00% <100.00%> (ø)

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 b0a5b4e...e67be80. Read the comment docs.

@MadCcc
Copy link
Member Author

MadCcc commented Jan 4, 2022

去掉了导致 issue 中提到问题的逻辑,但似乎这段代码已经很久远了,不知道这样处理有没有问题,test 姑且都通过了
@afc163 @zombieJ

@afc163
Copy link
Member

afc163 commented Jan 4, 2022

先对比一下 4.17.x 和 4.18.0 的依赖代码,看看是什么改动导致了升级后行为不一致。

@MadCcc
Copy link
Member Author

MadCcc commented Jan 5, 2022

对比了一下 4.17.x 的代码,rc-tree-select 用的是 4.8.0,与 5.0 alpha 版本差别较大。
整个 strategyUtil.ts 的用处不一样了,4.8.0 在选择时没有触发这边的逻辑,所以才没有问题。5.0 alpha 在显示已选中的选项时会利用这边的逻辑筛选应该显示的内容,检查了一下应该没有问题。

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.

TreeSelect 无法选中子节点全为disabled的节点
2 participants