1.0.3 • Published 2 years ago

react-native-wli-flatlist v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-native-wli-flatlist

Getting started

$ npm install react-native-wli-flatlist --save

Mostly automatic installation

$ react-native link react-native-wli-flatlist

Usage

import WliFlatlist from 'react-native-wli-flatlist';

// TODO: What to do with the module?

  <WliFlatlist
    data={DATA}
    renderItem={renderItem}
    keyExtractor={item => item.id}
  />     

Props

PropsTypeRequiredDescription
dataarrayYesArray List to be displayed.
renderItemfunctionYesTakes an item from data and renders it into the list.
keyExtractorfunctionOptionalUsed to extract a unique key for a given item at the specified index.
ListHeaderComponentcomponent, elementOptionalRendered at the top of all the items. Can be a React Component (e.g. SomeComponent), or a React element (e.g. ).
ListHeaderComponentStyleView StyleOptionalStyling for internal View for ListHeaderComponent.
ListFooterComponentcomponent, elementOptionalRendered at the bottom of all the items. Can be a React Component (e.g. SomeComponent), or a React element (e.g. ).
ListFooterComponentStyleView StyleOptionalStyling for internal View for ListFooterComponent.
onEndReachedfunctionOptionalCalled once when the scroll position gets within onEndReachedThreshold of the rendered content.
onEndReachedThresholdnumberOptionalHow far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback.
onRefreshfunctionOptionalIf provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make sure to also set the refreshing prop correctly.
refreshingbooleanOptionalSet this true while waiting for new data from a refresh..
ItemSeparatorComponentcomponentOptionalRendered in between each item, but not at the top or bottom.
horizontalbooleanOptionalIf true, renders items next to each other horizontally instead of stacked vertically.
numColumnsnumberOptionalUsed to show list in grid view.

We can also use other properties of FlatList in this component as per our requirment just need to pass as it is as we pass in FlatList.

Methods

We can use all Methods of FlatList also just need to pass as we pass in FlatList.

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago