{"id":26964416,"url":"https://github.com/nicklayb/react-tabledata-async","last_synced_at":"2025-04-03T06:32:16.526Z","repository":{"id":57346136,"uuid":"80834465","full_name":"nicklayb/react-tabledata-async","owner":"nicklayb","description":"Asynchronous tabledata for lazyloading results","archived":false,"fork":false,"pushed_at":"2017-02-04T05:52:17.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-20T12:16:30.700Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/nicklayb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-03T14:07:00.000Z","updated_at":"2017-02-03T15:47:14.000Z","dependencies_parsed_at":"2022-09-19T13:11:58.529Z","dependency_job_id":null,"html_url":"https://github.com/nicklayb/react-tabledata-async","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/nicklayb%2Freact-tabledata-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklayb%2Freact-tabledata-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklayb%2Freact-tabledata-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklayb%2Freact-tabledata-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicklayb","download_url":"https://codeload.github.com/nicklayb/react-tabledata-async/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246948004,"owners_count":20859360,"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":"2025-04-03T06:31:22.720Z","updated_at":"2025-04-03T06:32:16.516Z","avatar_url":"https://github.com/nicklayb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-tabledata-async\n\n###### By Nicolas Boisvert :: nicklay@me.com\n\n### Asynchronous tabledata for lazyloading datas\n\nBasically built on [react-tabledata](https://github.com/nicklayb/react-tabledata), it allows you to display async data in the table. It also allow you to lazyload only parts of your whole data instead of loading everything\n\n## Installation\n\nI recommand a npm installation by :\n```\nnpm install --save react-tabledata-async\n```\n\n## Examples\n\nThis is a concrete example of how you can use it with the [JSONPlaceholder test api](https://jsonplaceholder.typicode.com/).\n\n```jsx\nimport React, { Component } from 'react';\nimport ReactDOM from 'react-dom';\nimport { Tableasync, Tableheader } from '../src/';\n\nclass Example extends Component {\n    render() {\n        return (\n            \u003cdiv\u003e\n                \u003cTableasync url={'https://jsonplaceholder.typicode.com/posts'}\u003e\n                    \u003cTableheader attribute={'title'}\u003eTitle\u003c/Tableheader\u003e\n                    \u003cTableheader attribute={'body'}\u003eBody\u003c/Tableheader\u003e\n                \u003c/Tableasync\u003e\n            \u003c/div\u003e\n        );\n    }\n}\n\ndocument.addEventListener('DOMContentLoaded', () =\u003e {\n    ReactDOM.render(\n        \u003cExample/\u003e,\n        document.querySelector('#react-app')\n    );\n});\n```\n\n### Tableasync\n\nThe `Tabledata` component is the table container. It requires at least a `url` attribute matching your API. You can pass it a `method` attribute but it's a `GET` request by default. You can also pass in two function for adding request data with `requestData` or adding request headers with `requestHeaders`. In both case, the function you use receives the object that'll be sent. All you have to do is append your properties to it.\n\n### Tableheader\n\nThe `Tableheader` matches all the `\u003cth\u003e` tags you'll want. If you want it to display the value of an object attribute, you pass in the `attribute` attribute. In the example, you can see that with have 3 `Tableheader` with attribute and 2 computed header. You can also pass in an attribute `renderCell` that will render each cell of the header.\n\n## Conclusion\n\nThank you for using, testing and improving it and feel free to contact me for any question.\n\nEnding joke :\n\u003e How do you telle HTML from HTML5? - Try it out in Internet Explorer. - Did it work?. - No?. - It's HTML5.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicklayb%2Freact-tabledata-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicklayb%2Freact-tabledata-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicklayb%2Freact-tabledata-async/lists"}