{"id":17374137,"url":"https://github.com/fjmorant/react-native-nested-listview","last_synced_at":"2025-04-05T18:05:25.979Z","repository":{"id":22474689,"uuid":"96354124","full_name":"fjmorant/react-native-nested-listview","owner":"fjmorant","description":"Display nested arrays of N levels with this React Native library.","archived":false,"fork":false,"pushed_at":"2023-03-07T02:01:42.000Z","size":1706,"stargazers_count":195,"open_issues_count":9,"forks_count":25,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T17:03:11.115Z","etag":null,"topics":["android","expo","ios","listview","nested-objects","nested-structures","react","react-component","react-native","reactjs","tree","treeview","typescript"],"latest_commit_sha":null,"homepage":"","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/fjmorant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["fjmorant"],"ko_fi":"fjmorant"}},"created_at":"2017-07-05T19:28:21.000Z","updated_at":"2025-01-13T16:32:13.000Z","dependencies_parsed_at":"2024-06-18T20:05:22.143Z","dependency_job_id":"bca6ed67-e941-447e-8c5a-d66761807dfb","html_url":"https://github.com/fjmorant/react-native-nested-listview","commit_stats":{"total_commits":232,"total_committers":8,"mean_commits":29.0,"dds":0.4482758620689655,"last_synced_commit":"a54cbdbc2613ba2ffc112aeb76ba44bce8a6649a"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjmorant%2Freact-native-nested-listview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjmorant%2Freact-native-nested-listview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjmorant%2Freact-native-nested-listview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjmorant%2Freact-native-nested-listview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fjmorant","download_url":"https://codeload.github.com/fjmorant/react-native-nested-listview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247378138,"owners_count":20929296,"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":["android","expo","ios","listview","nested-objects","nested-structures","react","react-component","react-native","reactjs","tree","treeview","typescript"],"created_at":"2024-10-16T03:04:09.980Z","updated_at":"2025-04-05T18:05:25.951Z","avatar_url":"https://github.com/fjmorant.png","language":"TypeScript","readme":"# react-native-nested-listview\n\nUI component for React Native that allows to create a listview with N levels of nesting\n\n![platforms](https://img.shields.io/badge/platforms-Android%20%7C%20iOS%20%7C%20Expo-brightgreen)\n[![CircleCI](https://circleci.com/gh/fjmorant/react-native-nested-listview.svg?style=shield)](https://circleci.com/gh/fjmorant/react-native-nested-listview)\n[![codecov](https://codecov.io/gh/fjmorant/react-native-nested-listview/branch/master/graph/badge.svg)](https://codecov.io/gh/fjmorant/react-native-nested-listview)\n[![npm](https://img.shields.io/npm/v/react-native-nested-listview.svg?style=flat-square)](https://www.npmjs.com/package/react-native-nested-listview)\n[![github release](https://img.shields.io/github/release/fjmorant/react-native-nested-listview.svg?style=flat-square)](https://github.com/fjmorant/react-native-nested-listview/releases)\n[![CodeFactor](https://www.codefactor.io/repository/github/fjmorant/react-native-nested-listview/badge)](https://www.codefactor.io/repository/github/fjmorant/react-native-nested-listview)\n\n## Table of contents\n\n1. [Show](#show)\n1. [Usage](#usage)\n1. [Props](#props)\n1. [Examples](#examples)\n1. [Roadmap](#roadmap)\n\n## Show\n\n![react-native-nested-listview](https://i.imgur.com/Y3VFTry.gif)\n![react-native-nested-listview](https://i.imgur.com/nJvl0ZT.gif)\n\n## Usage\n\n```\nyarn add react-native-nested-listview\n```\n\n```javascript\nimport NestedListView, {NestedRow} from 'react-native-nested-listview'\n\nconst data = [{title: 'Node 1', items: [{title: 'Node 1.1'}, {title: 'Node 1.2'}]}]\n\n\u003cNestedListView\n  data={data}\n  getChildrenName={(node) =\u003e 'items'}\n  onNodePressed={(node) =\u003e alert('Selected node')}\n  renderNode={(node, level, isLastLevel) =\u003e (\n    \u003cNestedRow\n      level={level}\n      style={styles.row}\n    \u003e\n      \u003cText\u003e{node.title}\u003c/Text\u003e\n    \u003c/NestedRow\u003e\n  )}\n/\u003e\n```\n\n## Props\n\n### NestedListView\n\n| Prop                     | Description                                                                                                                                                              | Type     | Default      |\n| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------------ |\n| **`data`**               | Array of nested items                                                                                                                                                    | Array    | **Required** |\n| **`renderNode`**         | Takes a node from data and renders it into the NestedlistView. The function receives `{node, level, isLastLevel}` (see [Usage](#usage)) and must return a React element. | Function | **Required** |\n| **`getChildrenName`**    | Function to determine in a node where are the children, by default NestedListView will try to find them in **items**                                                     | Function | **items**    |\n| **`onNodePressed`**      | Function called when a node is pressed by a user                                                                                                                         | Function | Not required |\n| **`extraData`**          | A marker property for telling the list to re-render                                                                                                                      | Boolean  | Not required |\n| **`keepOpenedState`**    | Prop for keeping the opened state of each node when data passed to the list changes                                                                                      | Boolean  | Not required |\n| **`initialNumToRender`** | Prop for setting the initial amount of items to render.                                                                                                                  | number   | Not required |\n\n### NestedRow\n\n| Prop           | Description                 | Type      | Default      |\n| -------------- | --------------------------- | --------- | ------------ |\n| **`height`**   | Height of the row           | number    | 50           |\n| **`children`** | Content of the NestedRow    | Component | **Required** |\n| **`level`**    | Level where a given node is | number    | **Required** |\n| **`style`**    | NestedRow container style   | Style     | Not required |\n\n## Examples\n\nYou can find examples [here](https://github.com/fjmorant/react-native-nested-listview-examples) and also an Expo project [here](https://github.com/fjmorant/react-native-nested-listview-examples-expo) \n\n| Version App | React Native | Library |\n| ----------- | ------------ | ------- |\n| 1.0.0       | 0.70.1       | 0.14.0  |\n\n## Roadmap\n\nI have moved the roadmap of this library to this trello board so that it can be easier to add more things and like that it doesn't create issues in GitHub if I need to create a ticket\n\n[Roadmap Trello Board](https://trello.com/b/IOMR8gFw)\n\n## Development\n\nIn other to start watch mode and develop the library with the examples project (described above), you need to have installed the following npm packages:\n\n- `npm -g json`\n- `npm -g wml`\n\nAnd have the library and examples project in the same root folder, example:\n\n- root\n  - react-native-nested-listview\n  - react-native-nested-listview-examples\n\nAfter the previous steps you can then run the following command:\n\n`yarn start-watch`\n\nand then you can start the examples app as usual:\n\n`yarn ios` or `yarn android`\n\nWhen you finish with watch mode remember to stop it to get back to normal like this:\n\n`yarn stop-watch`\n\n## Invite me a coffee\n\nIf you want to invite me for a coffee after enjoying this library or just for fun.\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/D1D16TF2V)\n\nThanks\n","funding_links":["https://github.com/sponsors/fjmorant","https://ko-fi.com/fjmorant","https://ko-fi.com/D1D16TF2V"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffjmorant%2Freact-native-nested-listview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffjmorant%2Freact-native-nested-listview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffjmorant%2Freact-native-nested-listview/lists"}