{"id":18530950,"url":"https://github.com/lucasferreira/react-virtualized-sectionlist","last_synced_at":"2025-04-09T13:31:42.184Z","repository":{"id":57347446,"uuid":"98934961","full_name":"lucasferreira/react-virtualized-sectionlist","owner":"lucasferreira","description":"React SectionList component based in react-virtualized List","archived":false,"fork":false,"pushed_at":"2018-04-24T16:48:47.000Z","size":23,"stargazers_count":20,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T06:12:38.478Z","etag":null,"topics":["header","list","react","react-components","sectionlist","virtualization"],"latest_commit_sha":null,"homepage":"","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/lucasferreira.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-07-31T22:22:07.000Z","updated_at":"2023-08-03T09:46:06.000Z","dependencies_parsed_at":"2022-08-28T03:01:30.062Z","dependency_job_id":null,"html_url":"https://github.com/lucasferreira/react-virtualized-sectionlist","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/lucasferreira%2Freact-virtualized-sectionlist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasferreira%2Freact-virtualized-sectionlist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasferreira%2Freact-virtualized-sectionlist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasferreira%2Freact-virtualized-sectionlist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucasferreira","download_url":"https://codeload.github.com/lucasferreira/react-virtualized-sectionlist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247737787,"owners_count":20987735,"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":["header","list","react","react-components","sectionlist","virtualization"],"created_at":"2024-11-06T18:04:37.609Z","updated_at":"2025-04-09T13:31:42.177Z","avatar_url":"https://github.com/lucasferreira.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-virtualized-sectionlist\nReact SectionList component based in a wrapper around [react-virtualized](https://github.com/bvaughn/react-virtualized) List.\n\n[![npm version](http://img.shields.io/npm/v/react-virtualized-sectionlist.svg?style=flat-square)](https://npmjs.org/package/react-virtualized-sectionlist \"View this project on npm\")\n[![npm downloads](http://img.shields.io/npm/dm/react-virtualized-sectionlist.svg?style=flat-square)](https://npmjs.org/package/react-virtualized-sectionlist \"View this project on npm\")\n[![npm licence](http://img.shields.io/npm/l/react-virtualized-sectionlist.svg?style=flat-square)](https://npmjs.org/package/react-virtualized-sectionlist \"View this project on npm\")\n\nThis component can be usefull to display large sets of grouped data with header line between groups.\n\n### Installation\n\n```bash\nnpm install react-virtualized-sectionlist --save\n```\n\n```bash\nyarn add react-virtualized-sectionlist\n```\n\n## Example / Usage\n\nThis component mimic the same concepts, props and API from [react-virtualized](https://github.com/bvaughn/react-virtualized) List component. If you need [`click here`](https://github.com/bvaughn/react-virtualized/blob/master/docs/List.md) to get more info about.\n\nIn order to use this component your *data* need be in this format-schema:\n\n```javascript\nconst sections = [\n  { title: 'Group 1', data: ['Item 1 of Group 1', 'Item 2 of Group 1', 'Item 3 of Group 1', ...] },\n  { title: 'Group 2', data: ['Item 1 of Group 2', 'Item 2 of Group 2', 'Item 3 of Group 2', ...] },\n  { title: 'Group 3', data: ['Item 1 of Group 3', 'Item 2 of Group 3', 'Item 3 of Group 3', ...] },\n  ...\n];\n```\n\nAnd to render your the SectionList:\n\n```javascript\nimport React, { Component } from 'react';\nimport SectionList from 'react-virtualized-sectionlist';\n\nconst renderHeader = ({title, sectionIndex, key, style, isScrolling, isVisible, parent}) =\u003e {\n  return (\n    \u003cdiv key={key} className=\"list--header\" style={style}\u003e\n      \u003ch4\u003e{title}\u003c/h4\u003e\n    \u003c/div\u003e\n  );\n};\n\nconst renderRow = ({item, sectionIndex, rowIndex, key, style, isScrolling, isVisible, parent}) =\u003e {\n  return (\n    \u003cdiv key={key} className=\"list--item\" style={style}\u003e\n      \u003cp\u003e{item}\u003c/p\u003e\n    \u003c/div\u003e\n  );\n};\n\nconst ROW_HEIGHT = 30;\n\nconst sections = [\n  { title: 'Group 1', data: ['Item 1 of Group 1', 'Item 2 of Group 1', 'Item 3 of Group 1'] },\n  { title: 'Group 2', data: ['Item 1 of Group 2', 'Item 2 of Group 2', 'Item 3 of Group 2'] },\n  { title: 'Group 3', data: ['Item 1 of Group 3', 'Item 2 of Group 3', 'Item 3 of Group 3'] },\n];\n\nconst MySectionList = () =\u003e {\n  return (\n    \u003cSectionList\n      width={300}\n      height={250}\n      sections={sections}\n      sectionHeaderRenderer={renderHeader}\n      sectionHeaderHeight={ROW_HEIGHT}\n      rowHeight={ROW_HEIGHT}\n      rowRenderer={renderRow} /\u003e}\n  );\n};\n\n// before that you can use your \u003cMySectionList /\u003e component everywhere you need...\n```\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasferreira%2Freact-virtualized-sectionlist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucasferreira%2Freact-virtualized-sectionlist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasferreira%2Freact-virtualized-sectionlist/lists"}