Have ideas to improve npm?Join in the discussion! »

    react-table-scrollbar

    0.1.11 • Public • Published

    react-table-scrollbar

    React fixed table header position and auto scrollbar.

    demo

    Getting Started

    react-table-scrollbar

    • Install the package dependency:
        $ npm install --save react-table-scrollbar
    • Import the TableScrollbar component and use it to enclose your table:
        import TableScrollbar from 'react-table-scrollbar';
        ...
        <TableScrollbar>
          <table>
            ...
          </table>
        </TableScrollbar>

    Sizing the table

    • You can specify the table height as a number of body rows:
        <TableScrollbar rows={5}>
          <table>
            ...
          </table>
        </TableScrollbar>
    • ... Or by passing a height prop in any valid CSS unit:
        <TableScrollbar height="200px">
          <table>
            ...
          </table>
        </TableScrollbar>
    • By default, the table will fill up the container's height
        <div style={{height: "30vh"}}>
          <TableScrollbar>
            <table>
              ...
            </table>
          </TableScrollbar>
        </div>

    License

    MIT

    Contribute

    To submit issues and pull requests: https://github.com/oelshocht/react-table-scrollbar.git

    Install

    npm i react-table-scrollbar

    DownloadsWeekly Downloads

    403

    Version

    0.1.11

    License

    MIT

    Unpacked Size

    102 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar