{"id":21835750,"url":"https://github.com/vtex/react-jsonschema-table","last_synced_at":"2025-04-14T09:15:22.701Z","repository":{"id":57333551,"uuid":"107305476","full_name":"vtex/react-jsonschema-table","owner":"vtex","description":"React component for generating a Table using JSON Schema specification","archived":false,"fork":false,"pushed_at":"2018-07-23T17:05:23.000Z","size":734,"stargazers_count":24,"open_issues_count":12,"forks_count":2,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-14T09:15:04.767Z","etag":null,"topics":["srv-styleguide","xp-developer"],"latest_commit_sha":null,"homepage":"","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/vtex.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":"2017-10-17T18:03:28.000Z","updated_at":"2025-02-08T06:27:28.000Z","dependencies_parsed_at":"2022-08-24T20:50:55.394Z","dependency_job_id":null,"html_url":"https://github.com/vtex/react-jsonschema-table","commit_stats":null,"previous_names":[],"tags_count":66,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex%2Freact-jsonschema-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex%2Freact-jsonschema-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex%2Freact-jsonschema-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex%2Freact-jsonschema-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vtex","download_url":"https://codeload.github.com/vtex/react-jsonschema-table/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248852184,"owners_count":21171842,"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":["srv-styleguide","xp-developer"],"created_at":"2024-11-27T20:24:21.291Z","updated_at":"2025-04-14T09:15:22.676Z","avatar_url":"https://github.com/vtex.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# react-jsonschema-table\n\n\u003e Simple usage react component stylesheet table with inifnite scroll for massive data consumption and line editing using JSONSchema as data structure.\n\n### Work In Progress !\n\n[![NPM](https://img.shields.io/npm/v/react-modern-library-boilerplate.svg)](https://www.npmjs.com/package/react-modern-library-boilerplate) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n## Install\n\n```bash\nnpm install --save react-jsonschema-table\n```\n\n## Simple Usage\n\n```js\nimport React, { Component } from 'react'\n\nimport Table from 'react-jsonschema-table'\n\nconst schema = {\n  properties: {\n    name: {\n      type: 'string',\n      title: 'Name',\n    },\n    lastName: {\n      type: 'string',\n      title: 'LastName',\n    },\n    email: {\n      type: 'string',\n      format: 'email',\n      title: 'Email',\n    }\n  }\n}\n\nclass Example extends Component {\n  render () {\n    return (\n      \u003cTable schema={schema} /\u003e\n    )\n  }\n}\n```\n## API\n\n**schema:** Is the JSONSchema that contains the estructure and validation rules of the rendered data.\n\n**items**: An array of document objectcs compliant to the schema format. exemple:\n```js\n  items: [{\n    virtualId: 0, // integer\n    document: { // actual document\n      name: 'Jhon',\n      lastName: 'Doe',\n      email: 'jhon@doe.com',\n      id: '2a08db19-894c-4d1a-82b6-f4abe2ebbe33'\n    }, // compliant to schema, you can have extra fields, they will not show on the Table but will be considered in callbacks\n    status: 'loaded' // string (one of 'loaded', 'loading', 'lazzy','new','invalid')\n  }]\n```\n\n**pagination**: boolean default true. If JsonschemaTable should paginate items for better handling massive amounts of items. (callback will be called when user has scrolled until 80% of items)\n\n**getMoreItems**: function callback so JsonschemaTable can let you know it needs to load more items if pagination is activated\n\n**shouldSaveData**: boolean default true that activates the save feature. (which can be configured with the following function)\n\n**stagingItemsCallback**: function that return all the staging documents when 'save' button is clicked, so you can save them to your API or whatever.\n\n**checkedItemsCallback**: function that return all the checked documents when 'delete' button is clicked, so you can delete them in your API or whatever.\n\n**toolbarConfigs**: object to configure and toggle toolbar functions. example:\n```js\ntoolbarConfigs: {\n  hideStateFilterBtn: true,\n  hideColumnsVisibilityBtn: true,\n  hideDownloadBtn: true,\n  hideNewLineBtn: true,\n  hideDeleteBtn: true,\n  hideUndoBtn: true,\n  hideSaveBtn: true,\n}\n```\n\n## Local setup for developing\n\nSetup project\n\n```bash\nnpm i\n```\n\nRun example\n\n```bash\nnpm start\n```\n\n## License\n\nMIT © [VTEX](https://github.com/vtex)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvtex%2Freact-jsonschema-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvtex%2Freact-jsonschema-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvtex%2Freact-jsonschema-table/lists"}