This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

react-table-drag-select

0.3.1 • Public • Published

react-table-drag-select

Animation of the component

  • Ultra fast
  • Good for user inputted timetables
  • Less than 4kB when gzipped
  • Functionally and stylistically flexible

Installation

npm install -S react-table-drag-select

Basic example

This code was used to make the gif you see above. See the demo for advanced usage.

import React from "react";
import TableDragSelect from "react-table-drag-select";
import "react-table-drag-select/style.css";
 
class App extends React.Component {
  state = {
    cells: [
      [false, false, false, false, false, false],
      [false, false, false, false, false, false],
      [false, false, false, false, false, false],
      [false, false, false, false, false, false],
      [false, false, false, false, false, false],
      [false, false, false, false, false, false],
      [false, false, false, false, false, false]
    ]
  };
 
  render = () =>
    <TableDragSelect
      value={this.state.cells}
      onChange={cells => this.setState({ cells })}
    >
      <tr>
        <td />
        <td />
        <td />
        <td />
        <td />
        <td />
      </tr>
      <tr>
        <td />
        <td />
        <td />
        <td />
        <td />
        <td />
      </tr>
      <tr>
        <td />
        <td />
        <td />
        <td />
        <td />
        <td />
      </tr>
      <tr>
        <td />
        <td />
        <td />
        <td />
        <td />
        <td />
      </tr>
      <tr>
        <td />
        <td />
        <td />
        <td />
        <td />
        <td />
      </tr>
      <tr>
        <td />
        <td />
        <td />
        <td />
        <td />
        <td />
      </tr>
      <tr>
        <td />
        <td />
        <td />
        <td />
        <td />
        <td />
      </tr>
    </TableDragSelect>;
}

Dependencies (3)

Dev Dependencies (16)

Package Sidebar

Install

npm i react-table-drag-select

Weekly Downloads

3,117

Version

0.3.1

License

MIT

Last publish

Collaborators

  • mcjohnalds