Skip to content

pikselpalette/react-resizable-table

Repository files navigation

React Resizable Table

License npm version Build Status Codacy Badge devDependencies Status peerDependencies Status codecov Mutation testing badge

Installation

npm i --save react-resizable-table

Usage

import ResizableTable, { ResizingIcon } from 'react-resizable-table';

const MyTable = ({ onColumnResize }) => (
  <ResizableTable onColumnResize={onColumnResize}>
    <table>
      <thead>
        <tr>
          <th>Foo <ResizingIcon /></th>
          <th>Bar <ResizingIcon /></th>
          <th>No resizing </th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>foo</td>
          <td>bar</td>
          <td>yep</td>
        </tr>
        <tr>
          <td>whizz</td>
          <td>woop</td>
          <td>hi</td>
        </tr>
      </tbody>
    </table>
  </ResizableTable>
);

export default MyTable;

About

Add resizable columns to a table

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published