-
Notifications
You must be signed in to change notification settings - Fork 596
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
Fix TreeList getSelectedRowKeys behaviour in leavesOnly case #2839
Fix TreeList getSelectedRowKeys behaviour in leavesOnly case #2839
Conversation
Require @lukyanovas to review the deprecations in doccomments |
@@ -560,7 +560,7 @@ DataSourceAdapter = DataSourceAdapter.inherit((function() { | |||
|
|||
node && treeListCore.foreachNodes([node], function(childNode) { | |||
if(!childNode.children.length && (!callBack || callBack(childNode))) { | |||
result.push(childNode.key); | |||
result.indexOf(childNode.key) < 0 && result.push(childNode.key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indexOf is very hard op[eration for large amount of nodes
} | ||
|
||
if(mode === "all") { | ||
if(this.isRecursiveSelection() && mode !== "excludeRecursive") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to check on 'includeRecursive': mode === "includeRecursive"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After refix this string can look like this or mode === "includeRecursive" || mode === "leavesOnly"
No description provided.