Skip to content

Update react-ui-tree.js #14

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

Open
wants to merge 3 commits into
base: gh-pages
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update react-ui-tree.js
I don't think this is necessary. I may want to move a node under another if it's collapsed. Also this prevents moving any nodes without children under another in the same tree node.
  • Loading branch information
dannav committed Oct 17, 2015
commit 8708e5ca33154bc6cce84fbe6f9a016e4dc26bdc
4 changes: 2 additions & 2 deletions dist/react-ui-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ module.exports = React.createClass({
}
} else if (diffX > paddingLeft) {
// right
if (index.prev && !tree.getIndex(index.prev).node.collapsed) {
if (index.prev) {
newIndex = tree.move(index.id, index.prev, 'append');
}
}
Expand Down Expand Up @@ -231,4 +231,4 @@ module.exports = React.createClass({

this.change(tree);
}
});
});