How to use the react-sortable-tree.default function in react-sortable-tree

To help you get started, we’ve selected a few react-sortable-tree examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openworm / org.geppetto.frontend / src / main / webapp / js / components / interface / tree / Tree.js View on Github external
define(function (require) {

	require("./Tree.less");

	var React = require('react');
	var SortableTree = require('react-sortable-tree').default;
	var toggleExpandedForAll = require('react-sortable-tree').toggleExpandedForAll;
	var changeNodeAtPath = require('react-sortable-tree').changeNodeAtPath;
	var walk = require('react-sortable-tree').walk;
	var AbstractComponent = require('../../AComponent');

	return class Tree extends AbstractComponent {

		constructor(props) {
			super(props);

			this.updateTreeData = this.updateTreeData.bind(this);
			this.expandAll = this.expandAll.bind(this);
			this.collapseAll = this.collapseAll.bind(this);
			this.state = {
				treeData: this.props.treeData,
			};