Skip to content

frontend-collective/react-sortable-tree-theme-full-node-drag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

May 26, 2018
d70ec3f · May 26, 2018

History

22 Commits
Dec 3, 2017
Oct 18, 2017
Nov 1, 2017
Oct 18, 2017
Oct 18, 2017
May 26, 2018
Feb 3, 2018
Dec 3, 2017
Dec 3, 2017
Dec 3, 2017
Dec 3, 2017
Dec 3, 2017
May 26, 2018
Oct 18, 2017

Repository files navigation

React Sortable Tree Full Node Drag Theme

theme appearance

Features

  • No drag handles. You can click anywhere on a node to drag it.

Usage

npm install --save react-sortable-tree-theme-full-node-drag
import React, { Component } from 'react';
import SortableTree from 'react-sortable-tree';
import FileExplorerTheme from 'react-sortable-tree-theme-full-node-drag';

export default class Tree extends Component {
  constructor(props) {
    super(props);

    this.state = {
      treeData: [{ title: 'src/', children: [ { title: 'index.js' } ] }],
    };
  }

  render() {
    return (
      <div style={{ height: 400 }}>
        <SortableTree
          treeData={this.state.treeData}
          onChange={treeData => this.setState({ treeData })}
          theme={FileExplorerTheme}
        />
      </div>
    );
  }
}

About

Full node drag theme for react-sortable-tree

Resources

License

Stars

Watchers

Forks

Packages

No packages published