{"id":18488326,"url":"https://github.com/grid-js/gridjs-react","last_synced_at":"2025-05-02T14:32:40.844Z","repository":{"id":38011501,"uuid":"271855857","full_name":"grid-js/gridjs-react","owner":"grid-js","description":"React component for Grid.js","archived":false,"fork":false,"pushed_at":"2024-01-16T00:03:53.000Z","size":831,"stargazers_count":47,"open_issues_count":3,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-06T13:00:43.928Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gridjs.io/docs/integrations/react","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grid-js.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"patreon":null,"open_collective":"gridjs","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-06-12T17:35:49.000Z","updated_at":"2024-04-10T00:54:29.000Z","dependencies_parsed_at":"2024-01-16T01:33:09.403Z","dependency_job_id":null,"html_url":"https://github.com/grid-js/gridjs-react","commit_stats":{"total_commits":140,"total_committers":5,"mean_commits":28.0,"dds":"0.37857142857142856","last_synced_commit":"ab25a8e488122c4ebebeb9380ffb14e7d3621e75"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grid-js%2Fgridjs-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grid-js%2Fgridjs-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grid-js%2Fgridjs-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grid-js%2Fgridjs-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grid-js","download_url":"https://codeload.github.com/grid-js/gridjs-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224315414,"owners_count":17291046,"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":[],"created_at":"2024-11-06T12:51:34.232Z","updated_at":"2024-11-12T17:18:29.904Z","avatar_url":"https://github.com/grid-js.png","language":"TypeScript","funding_links":["https://opencollective.com/gridjs"],"categories":["TypeScript"],"sub_categories":[],"readme":"# Grid.js for React\n\nReact component for [Grid.js](https://gridjs.io/)\n\n## Install\n\n```bash\nnpm install --save gridjs-react\n```\n\nAlso, make sure you have Grid.js installed already as it's a peer dependency of `gridjs-react`:\n\n```bash\nnpm install --save gridjs\n```\n\n## Usage\n\nImport the Grid component first:\n\n```js\nimport { Grid } from \"gridjs-react\";\n```\n\n```jsx\n\u003cGrid\n  data={[\n    ['John', 'john@example.com'],\n    ['Mike', 'mike@gmail.com']\n  ]}\n  columns={['Name', 'Email']}\n  search={true}\n  pagination={{\n    enabled: true,\n    limit: 1,\n  }}\n/\u003e\n```\n\nThen you can pass all Grid.js configs to the `Grid` component. See [Grid.js Config](https://gridjs.io/docs/config) for more details.\n\n## React component in cells\n\nYou can bind your React components or elements in Table cells (both in header and body cells). \nSimply import the `_` function and use it in `data`, `columns` or `formatter` function:\n\n```js\nimport { Grid, _ } from \"gridjs-react\";\n```\n\n```jsx\n\u003cGrid\n  data={[\n    [\n      _(\u003cb\u003eJohn\u003c/b\u003e),\n      'john@example.com',\n    ],\n    [\n      _(\u003cMyReactComponent\u003eMike\u003c/MyReactComponent\u003e),\n      'mike@gmail.com',\n    ]\n  ]}\n  columns={[\n    'Name', \n    {\n      name: 'Email',\n      formatter: (cell) =\u003e _(\u003ci\u003e{cell}\u003c/i\u003e)\n    }\n  ]}\n  search={true}\n  pagination={{\n    enabled: true,\n    limit: 1,\n  }}\n/\u003e\n```\n\n## Example\n\nSee the [React example](https://gridjs.io/docs/integrations/react) on Grid.js website.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrid-js%2Fgridjs-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrid-js%2Fgridjs-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrid-js%2Fgridjs-react/lists"}