element-plus
element-plus copied to clipboard
fix(components): [el-tree-select] fix lazy and multiple select node
1.Fix the issue where non-leaf nodes cannot be selected when using lazy and multiple together.
-
Since the original code did not handle the selection of non-leaf nodes before expanding lazy-loaded child nodes, additional processing was added to link the selection of parent and child nodes.
-
Because the time required for lazyLoad after nodeExpand cannot be predicted, the triggering time of the node-expand event in the tree has been adjusted to occur within the callback of the expand function. This change only affects the timing when using lazyLoad.
BREAKING CHANGE : no
closed closed Fixes #17232
Please make sure these boxes are checked before submitting your PR, thank you!
👋 @gaoxuan-haxibiao, seems like this is your first time contribution to element-plus.
- Please make sure that you have read our guidelines and code of conduct before making a contribution.
- You can comment with
/label Components:[component_name]to add a label for which component you are working on. - You may join our
for staying tuned.
Hello @gaoxuan-haxibiao, thank you for contributing to element-plus, please see our guideline to see how to make contribution
🧪 Playground Preview: https://element-plus.run/?pr=17903 Please comment the example via this playground if needed.
When selecting a non-leaf node, the display of modelValue was designed with reference to the SHOW_CHILD strategy from Ant Design TreeSelect showCheckedStrategy. Has element-plus considered adding a showCheckedStrategy prop to the TreeSelect component?
@tolking @btea Can review and merge this pr? Thank you!
Thanks!
