Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-sortable-tree-theme-checkbox

anniexing23MIT0.0.15

Full node drag checkbox theme for react-sortable-tree

react, react-component

readme

React Sortable Tree Checkbox Drag Theme

Features

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

Usage

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

const Tree = () => {
  const initTreeData = [{ title: 'Meat', children: [ { title: 'Chickens ', title: 'Pork', title:'Fish' } ] }];
  const [treeData, setTreeData] = useState(initTreeData);
  return (
    <div style={{height: 400}}>
      <SortableTree
          treeData={treeData}
          onChange={treeData => setTreeData(treeData)}
          theme={CustomTheme}
        />
    </div>
  )
}

changelog

Change Log

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

1.1.0 (2017-12-03)

Features

  • change theme to full-node drag theme (eb30848)