react-sortable-tree-theme-fabric

Fabric ui theme for react-sortable-tree

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
react-sortable-tree-theme-fabric
070.1.95 years ago5 years agoMinified + gzip package size for react-sortable-tree-theme-fabric in KB

Readme

React Sortable Tree Fabric GroupList Theme

Features

  • Use fabric ui GroupList render node content ,so you can use the feature of it.

Usage

npm install --save react-sortable-tree-theme-fabric

import React, { Component } from 'react';
import SortableTree from 'react-sortable-tree';
import FileExplorerTheme from 'react-sortable-tree-theme-fabric';

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

    this.state = {
      treeData: [
        { title: 'Trained Models' ,
          children:[
            { 
              title: 'Income Prediction [trained models]' , 
              children:[
                { title: 'Income Prediction [trained models-sub]' }
              ]
            }
          ]
        },
        { title: 'Data Format Conversions' ,
          children:[
            { title: 'Convert to ARFF'}
          ]
        },
      ],
    };
  }

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