Skip to content
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

Merged

Conversation

sometimesElen
Copy link
Contributor

No description provided.

@sometimesElen
Copy link
Contributor Author

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);
Copy link
Contributor

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") {
Copy link
Contributor

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"

Copy link
Contributor Author

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants