Socket
Socket
Sign inDemoInstall

react-native-contacts-atoz-list

Package Overview
Dependencies
1
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-contacts-atoz-list

High performance fixed height ListView to be used for a contact list or friends list in your application


Version published
Weekly downloads
2
decreased by-50%
Maintainers
1
Install size
1.05 MB
Created
Weekly downloads
 

Readme

Source

This package is just a fork of the work of brentvatne: https://github.com/brentvatne/fixed-height-windowed-list-view-experiment

I fixed some issues with the scrolling not working correctly and exposed the main listview component as AtoZList. The scroll performance is great for large lists which is why I switched to using brentvatne's implementation.

Alt text

Install

npm i -S react-native-atoz-list

Usage

import AtoZList from 'react-native-atoz-list';

..
...

let myData = {
    'A': [{..}, {...}, {...}],
    'B': [{..}, {..}, {..}],
    'C': [{..}, {..}, {..}]
}

render(
    return(
        <AtoZList
                sectionHeaderHeight={20}
                cellHeight={60}
                data={myData}
                renderCell={this._renderCellComponent}
                renderSection={this._renderSectionComponent}
        />
    );


);

Props

Note: You need to set the section height and cellHeight

propertyDescription
sectionHeaderHeightThe height of each header section
cellHeightThe height of each cellheightred
dataThe data that will be displayed. This should be an object in the format { 'A': [{..}, {..}], 'B': [{..}]}
renderCellThis function will render you cell componenet. It will be passed the objects from each element in the data arrays.
renderSectionThis function will render your section headers. It will be passed an object with key 'sectionId'. The value of 'sectionId' will be the keys from your data object. i.e 'A', 'B', 'C' etc..
onEndReachedCalled when all rows have been rendered and the list has been scrolled to within onEndReachedThreshold of the bottom. The native scroll event is provided.

Authors

Raheel Govindji rgovindji@gmail.com brentvatne https://github.com/brentvatne

Keywords

FAQs

Last updated on 18 Feb 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc