{"id":21009029,"url":"https://github.com/avin/react-vt-table","last_synced_at":"2025-05-15T02:32:54.955Z","repository":{"id":57347505,"uuid":"153459679","full_name":"avin/react-vt-table","owner":"avin","description":"Table realisation based on `react-window` library","archived":false,"fork":false,"pushed_at":"2024-04-23T01:47:35.000Z","size":2893,"stargazers_count":28,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-23T04:02:30.098Z","etag":null,"topics":["react","resize-column","selectable","sortable","table","table-realisation","virtualized"],"latest_commit_sha":null,"homepage":"https://avin.github.io/react-vt-table","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-17T13:15:34.000Z","updated_at":"2024-04-23T04:02:30.099Z","dependencies_parsed_at":"2022-08-28T04:00:58.121Z","dependency_job_id":null,"html_url":"https://github.com/avin/react-vt-table","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avin%2Freact-vt-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avin%2Freact-vt-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avin%2Freact-vt-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avin%2Freact-vt-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avin","download_url":"https://codeload.github.com/avin/react-vt-table/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225324104,"owners_count":17456460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["react","resize-column","selectable","sortable","table","table-realisation","virtualized"],"created_at":"2024-11-19T09:15:15.055Z","updated_at":"2024-11-19T09:15:15.678Z","avatar_url":"https://github.com/avin.png","language":"JavaScript","readme":"# React-VT-Table\n\nTable realisation based on [react-window](https://github.com/bvaughn/react-window) library.\n\n## Features\n\n-   Efficiently rendering large tables.\n-   Allow custom renderers for row, cell, and header.\n-   Built-in resize columns.\n-   Built-in auto-scrolling.\n-   Easy to add your own sorting and selecting mechanisms (see examples).\n-   Works with Immutable.Iterable data lists or native arrays of objects.\n\n## Installation\n\n```sh\nnpm install react-vt-table\n```\n\n## Demo\n\nHere are [some live examples](https://avin.github.io/react-vt-table?selectedKind=Table).\n\n## Examples\n\nCheck out `./src/stories` folder to find some code examples.\n\n## Styling\n\nYou can use built-in CSS style:\n\n```js\nimport 'react-vt-table/dist/style.css';\n```\n\nor create your own using existing one\n\n## API\n\n### `\u003cTable /\u003e`\n\n#### Props\n\n| Property              | Type               | Required? | Description                                                                                                                   |\n| :-------------------- | :----------------- | :-------: | :---------------------------------------------------------------------------------------------------------------------------- |\n| width                 | Number             |     ✓     | Table width.                                                                                                                  |\n| height                | Number             |     ✓     | Table height.                                                                                                                 |\n| headerHeight          | Number or Func     |           | Table header height (Default: 30).                                                                                            |\n| rowHeight             | Number or Func     |           | Table row height (Default: 30). \u003cbr\u003eFunction params: `(rowIndex)`.                                                            |\n| data                  | Immutable.Iterable |     ✓     | Data list for table content.                                                                                                  |\n| rowClassName          | Func               |           | Row className determine function. \u003cbr\u003eFunction params: `(rowIndex)`.                                                          |\n| rowRenderer           | Func               |           | Personal row renderer function. \u003cbr\u003eFunction params: see `\u003cRow /\u003e` props.                                                     |\n| sortIndicatorRenderer | Func               |           | Sort indicator render function. \u003cbr\u003eFunction params: `({ dataKey, columnIndex })`.                                            |\n| onHeaderClick         | Func               |           | Click Mouse action on header row. \u003cbr\u003eFunction params: `(event, { dataKey, columnIndex })`.                                   |\n| onHeaderDoubleClick   | Func               |           | Double Click Mouse action on header row. \u003cbr\u003eFunction params: `(event, { dataKey, columnIndex })`.                            |\n| onHeaderMouseOver     | Func               |           | Mouse Over action on header row. \u003cbr\u003eFunction params: `(event, { dataKey, columnIndex })`.                                    |\n| onHeaderMouseOut      | Func               |           | Mouse Out action on header row. \u003cbr\u003eFunction params: `(event, { dataKey, columnIndex })`.                                     |\n| onHeaderRightClick    | Func               |           | Right Click Mouse action on header row. \u003cbr\u003eFunction params: `(event, { dataKey, columnIndex })`.                             |\n| onRowClick            | Func               |           | Click Mouse action on table row. \u003cbr\u003eFunction params: `(event, { dataKey, columnIndex })`.                                    |\n| onRowDoubleClick      | Func               |           | Double Click Mouse action on table row. \u003cbr\u003eFunction params: `(event, { dataKey, columnIndex })`.                             |\n| onRowMouseOver        | Func               |           | Mouse Over action on table row. \u003cbr\u003eFunction params: `(event, { dataKey, columnIndex })`.                                     |\n| onRowMouseOut         | Func               |           | Mouse Out action on table row. \u003cbr\u003eFunction params: `(event, { dataKey, columnIndex })`.                                      |\n| onRowMouseDown        | Func               |           | Mouse Down action on table row. \u003cbr\u003eFunction params: `(event, { dataKey, columnIndex })`.                                     |\n| onRowMouseUp          | Func               |           | Mouse Up action on table row. \u003cbr\u003eFunction params: `(event, { dataKey, columnIndex })`.                                       |\n| onRowRightClick       | Func               |           | Right Click Mouse action on table row. \u003cbr\u003eFunction params: `(event, { dataKey, columnIndex })`.                              |\n| onScroll              | Func               |           | Action on table scroll. \u003cbr\u003eFunction params: See [React-Window's docs](https://react-window.now.sh/#/api/FixedSizeList).      |\n| onResizeColumn        | Func               |           | Action on change column width. \u003cbr\u003eFunction params: `({ dataKey, columnIndex, resizeDiff, newWidth })`.                       |\n| overflowWidth         | Number             |           | Width of vertical table overflow.                                                                                             |\n| minColumnWidth        | Number             |           | Minimal column width.                                                                                                         |\n| maxColumnWidth        | Number             |           | Maximum column width.                                                                                                         |\n| dynamicColumnWidth    | Bool               |           | Dynamic width for columns that was not resized.                                                                               |\n| listProps             | Object             |           | Props for inner `react-window` list component. @see See [React-Windows docs](https://react-window.now.sh/#/api/FixedSizeList) |\n| noItemsLabel          | Node               |           | No items in data list label.                                                                                                  |\n| disableHeader         | Bool               |           | Hide table header row.                                                                                                        |\n| autoScroll            | Bool               |           | Auto scroll to list bottom.                                                                                                   |\n| className             | String             |           | Optional custom CSS class name to attach to root container element.                                                           |\n| id                    | String             |           | Optional custom id to attach to root container element.                                                                       |\n\n#### Methods\n\n**scrollTo(scrollOffset: number): void**\n\n**scrollToItem(index: number, align: string = \"auto\"): void**\n\nFor more info see [React-Window's docs](https://react-window.now.sh/#/api/FixedSizeGrid)\n\n### `\u003cColumn /\u003e`\n\n#### Props\n\n| Property                 | Type   | Required? | Description                                                                                   |\n| :----------------------- | :----- | :-------: | :-------------------------------------------------------------------------------------------- |\n| cellRenderer             | Func   |           | Content cell render function. \u003cbr\u003eFunction params: `({ dataKey, rowData, columnIndex })`.     |\n| columnHeaderCellRenderer | Func   |           | Column header cell render function. \u003cbr\u003eFunction params: `({ label, dataKey, columnIndex })`. |\n| dataKey                  | String |           | Field key containing data.                                                                    |\n| width                    | Number |           | Default column width in pixels.                                                               |\n\n### `\u003cRow /\u003e`\n\nUse `Row` component only if you want to low modify your table rows. (See example `./srs/stories/rowRenderer.js`)\n\n#### Props\n\n| Property | Type   | Required? | Description                                                                                                                       |\n| :------- | :----- | :-------: | :-------------------------------------------------------------------------------------------------------------------------------- |\n| index    | Number |           | Row number                                                                                                                        |\n| style    | Object |           | Row style                                                                                                                         |\n| data     | Object |           | Additional row data `({dataList, rowProps})` where `dataList` is table data and rowProps is additional row properties (see below) |\n\n#### Additional row properties\n\nAdditional row properties are contained in row's `props.data.rowProps`\n\n| Property       | Type  | Required? | Description                                                                          |\n| :------------- | :---- | :-------: | :----------------------------------------------------------------------------------- |\n| columns        | array |           | Table columns array                                                                  |\n| rowClassName   | Func  |           | Row className determine function. \u003cbr\u003eFunction params: `(rowIndex)`.                 |\n| getRowWidth    | Func  |           | Get row actual width.                                                                |\n| getDataRowItem | Func  |           | Function to get cell value. \u003cbr\u003eFunction params: `({rowData, dataKey})`.             |\n| getColumnWidth | Func  |           | Function to get column width. \u003cbr\u003eFunction params: `(columnIndex)`.                  |\n| getDataRow     | Func  |           | Function to get row data item. \u003cbr\u003eFunction params: `(rowIndex)`.                    |\n| onClick        | Func  |           | onClick row handler. \u003cbr\u003eFunction params: `(event, { dataKey, columnIndex })`.       |\n| onDoubleClick  | Func  |           | onDoubleClick row handler. \u003cbr\u003eFunction params: `(event, { dataKey, columnIndex })`. |\n| onMouseOver    | Func  |           | onMouseOver row handler. \u003cbr\u003eFunction params: `(event, { dataKey, columnIndex })`.   |\n| onMouseOut     | Func  |           | onMouseOut row handler. \u003cbr\u003eFunction params: `(event, { dataKey, columnIndex })`.    |\n| onRightClick   | Func  |           | onRightClick row handler. \u003cbr\u003eFunction params: `(event, { dataKey, columnIndex })`.  |\n\n## License\n\nMIT © [avin](https://github.com/avin)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favin%2Freact-vt-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favin%2Freact-vt-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favin%2Freact-vt-table/lists"}