{"id":24737830,"url":"https://github.com/zanechua/react-native-search-list","last_synced_at":"2025-10-10T06:32:01.935Z","repository":{"id":34841095,"uuid":"182959859","full_name":"zanechua/react-native-search-list","owner":"zanechua","description":"A searchable ListView which supports Chinese PinYin and alphabetical index.","archived":false,"fork":false,"pushed_at":"2023-01-06T02:02:01.000Z","size":5078,"stargazers_count":8,"open_issues_count":12,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-22T09:13:19.077Z","etag":null,"topics":["react-native","react-native-search-list"],"latest_commit_sha":null,"homepage":"https://github.com/zanechua/react-native-search-list/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"UnPourTous/react-native-search-list","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zanechua.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-04-23T07:33:01.000Z","updated_at":"2022-05-02T00:27:14.000Z","dependencies_parsed_at":"2023-01-15T09:30:22.334Z","dependency_job_id":null,"html_url":"https://github.com/zanechua/react-native-search-list","commit_stats":null,"previous_names":[],"tags_count":50,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanechua%2Freact-native-search-list","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanechua%2Freact-native-search-list/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanechua%2Freact-native-search-list/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanechua%2Freact-native-search-list/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zanechua","download_url":"https://codeload.github.com/zanechua/react-native-search-list/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235929974,"owners_count":19067857,"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":["react-native","react-native-search-list"],"created_at":"2025-01-27T22:09:27.693Z","updated_at":"2025-10-10T06:31:56.458Z","avatar_url":"https://github.com/zanechua.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native Search List\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://www.npmjs.com/package/react-native-search-list\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/react-native-search-list.svg?style=flat-square\" alt=\"Release\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/react-native-search-list\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/react-native-search-list.svg?style=flat-square\" alt=\"Release\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/zanechua/react-native-search-list/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/release/zanechua/react-native-search-list.svg?style=flat-square\" alt=\"Release\"\u003e\u003c/a\u003e\n\u003ca href=\"https://standardjs.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/code_style-semistandard-brightgreen.svg?style=flat-square\" alt=\"Semi Standard - JavaScript Style Guide\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/zanechua/react-native-search-list/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/zanechua/react-native-search-list.svg?style=flat-square\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\nA searchable ListView which supports Chinese PinYin and alphabetical index.\n\nA fork of https://github.com/unpourtous/react-native-search-list\n\nThe original library was missing some commonly used features that are now implemented and the deprecated ListView was replaced with a SectionList to be compatible with future releases of React Native.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src='https://user-images.githubusercontent.com/4265429/122762221-abf5ad80-d2cf-11eb-85f2-c25188081c02.gif' /\u003e\n\u003c/p\u003e\n\nThe following picture may be helpful to understand the structure and APIs: \n\n\u003cp align=\"center\"\u003e\n\u003cimg src='https://user-images.githubusercontent.com/4265429/122762306-c29c0480-d2cf-11eb-996a-de0cb8ab03a5.jpg' /\u003e\n\u003c/p\u003e\n\n## Installation\n\n```bash\nyarn add react-native-search-list\n```\n\n## Usage\n\nTo Use SearchList, you will need an array of objects as the data source, and each object has to have a `cursor` property, example code is in `./example.js`.\n\n\n## APIs\n\nprop name | type | description | default value\n--- | --- | --- | --- \ndata | array | The data object\nsearchCursor | string | Set the key in the data array that's being used as the search source | `cursor`\nrenderRow | number | Render your custom row content | \nrowHeight | number | The height of the default row content, it will be used for scroll calculate | `40`\nsectionHeaderHeight | number | The height of section header content | `24`\nlistContainerStyle | object | Style properties for the internal TextInput Component | \nsearchListBackgroundColor | string | BackgroundColor for searchList | `#171a23`\ntoolbarBackgroundColor | string | Toolbar background color | `#171a23`\nsearchBarToggleDuration | number | Custom search bar animation duration | `300`\nsearchBarBackgroundColor | string | Custom search bar background color | `#171a23`\nsearchBarContainerStyle | object | Style properties for the SearchBar Container Component | \nsearchBarStyle | object | Style properties for the SearchBar Component | \nsearchOnDefaultValue | bool | Enable filtered results based on default value | \nsearchIconColor | string | Custom color for the search icon | `#171a23`\nsearchInputBackgroundColor | string | Custom search input default state background color | `#ffffff`\nsearchInputBackgroundColorActive | string | Custom search input searching state background color | \nsearchInputPlaceholder | string | Custom search input placeholder text | \nsearchInputDefaultValue | string | Custom search input default value text | \nsearchInputPlaceholderColor | string | Custom search input placeholder text color | `#979797`\nsearchInputTextColor | string | Custom search input default state text color | `#171a23`\nsearchInputTextColorActive | string | Custom search input searching state text color | `#ffffff`\nsearchInputStyle | object | Style properties for the internal TextInput Component | \ntoolbarHeight | number | The height of the tool bar | `44`\nsearchBarBackgroundColor | string | Custom search bar background color | \nstaticCancelButton | bool | Enable/Disable a static cancel button with no slide in animation | `false`\nshowSearchIcon | bool | Show/Hide the search icon | `true`\ndisplayMask | bool | Show/Hide the mask during searching | `true`\ntitle | string | Toolbar title | \ntitleTextColor | string | Toolbar title text color | \ncancelTitle | string | Search bar cancel text color | `Cancel`\ncancelTextColor | string | Search bar cancel text color | `#ffffff`\ncancelContainerStyle | object | Style properties for the cancel button container |\nhideSectionList | bool | Whether to hide the alphabetical section listing view or not. |\nsortFunc | func | The sort function for the list view data source,sorting alphabetical by default |\nresultSortFunc | func | The sort function for the search result,sorting first match position by default |\nonScrollToSection | func | The callback of alphabetical section view be clicked or touch |\nsectionIndexTextColor | string | Section index text color | \nsectionIndexContainerStyle | object | Style properties for the Section Index Container Component | \nrenderSectionIndexItem | func | Custom render SectionIndexItem. |\nrenderBackButton | func | Render a custom back buttom on Toolbar. |\nrenderEmpty | func | Render a view when data is empty. |\nrenderEmptyResult | func | Render a view when search result is empty. |\nrenderItemSeparator | func | Render row separator. |\nrenderSectionHeader | func | `renderSectionHeader` for the internal ListView |\nrenderHeader | func | `renderHeader` for the internal ListView |\nrenderFooter | func | `renderFooter` for the internal ListView |\nrenderStickyHeader | func | `renderStickyHeader` for the section below the SearchBar |\nrenderRow | func | `renderRow` for the internal ListView |\nrenderToolbar | func | `renderToolbar` for the Toolbar |\nrenderCancel | func | `renderCancel` for custom rendering of the cancel button |\nrenderCancelWhileSearching | func | `renderCancelWhileSearching` for custom rendering of the cancel button during search |\nonSearchStart | func | Callback when searching start. |\nonSearchEnd | func | Callback when searching end. |\n\n\n## Contributions\n* [js-pinyin](https://github.com/waterchestnut/pinyin)\n* [@unpourtous/react-native-search-list](https://github.com/unpourtous/react-native-search-list)\n* [react-native-selectablesectionlistview](https://github.com/johanneslumpe/react-native-selectablesectionlistview)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzanechua%2Freact-native-search-list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzanechua%2Freact-native-search-list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzanechua%2Freact-native-search-list/lists"}