Module

ReactNative.Components.ListView

Package
purescript-reactnative
Repository
doolse/purescript-reactnative

See ListView

#ListViewProps Source

type ListViewProps a section blob r = { dataSource :: ListViewDataSource' blob a section, renderRow :: RowRenderer a | r }

#listView Source

listView :: forall section a blob. ListViewDataSource' blob a section -> (a -> ReactElement) -> ReactElement

Create a list view with a data source and a simple row rendering function

#listView' Source

listView' :: forall section a blob o. Optional o (ListViewPropsO section) => ListViewProps a section blob o -> ReactElement

Create a list view with props, a data source and a row renderer

#ListViewDataSource' Source

#listViewDataSource Source

listViewDataSource :: forall a. Array a -> ListViewDataSource a

Create a ListViewDataSource from an Array

Uses reference equality for rowHasChanged

#listViewDataSource' Source

listViewDataSource' :: forall o section a blob. Optional o (ListViewDataSourcePropsO blob a section) => Record o -> ListViewDataSource' blob a section

#sectionListViewDataSource Source

sectionListViewDataSource :: forall section a blob. DataSourceSectionCloneable blob a section => blob -> ListViewDataSource' blob a section

#getRowCount Source

getRowCount :: forall section a blob. ListViewDataSource' blob a section -> Int

#getRowAndSectionCount Source

getRowAndSectionCount :: forall section a blob. ListViewDataSource' blob a section -> Int

#rowShouldUpdate Source

rowShouldUpdate :: forall section a blob. ListViewDataSource' blob a section -> SectionId -> RowId -> Boolean

#getRowData Source

getRowData :: forall section a blob. ListViewDataSource' blob a section -> SectionId -> RowId -> a

#getRowIDForFlatIndex Source

getRowIDForFlatIndex :: forall section a blob. ListViewDataSource' blob a section -> Int -> Nullable String

#getSectionIDForFlatIndex Source

getSectionIDForFlatIndex :: forall section a blob. ListViewDataSource' blob a section -> Int -> Nullable String

#getSectionLengths Source

getSectionLengths :: forall section a blob. ListViewDataSource' blob a section -> Array Int

#sectionHeaderShouldUpdate Source

sectionHeaderShouldUpdate :: forall section a blob. ListViewDataSource' blob a section -> SectionId -> Boolean

#getSectionHeaderData Source

getSectionHeaderData :: forall section a blob. ListViewDataSource' blob a section -> SectionId -> section

#DataSourceRowCloneable Source

class DataSourceRowCloneable blob a | blob -> a

Instances

#DataSourceSectionCloneable Source

class DataSourceSectionCloneable blob a section | blob -> a, blob -> section

Instances

#cloneWithRows Source

#cloneWithRows' Source

cloneWithRows' :: forall a blob. Maybe (Array RowId) -> (DataSourceRowCloneable blob a => ListViewDataSource' blob a blob -> blob -> ListViewDataSource' blob a blob)

#cloneWithRowsAndSections Source

cloneWithRowsAndSections :: forall section a blob. DataSourceSectionCloneable blob a section => ListViewDataSource' blob a section -> blob -> ListViewDataSource' blob a section

#cloneWithRowsAndSections' Source

cloneWithRowsAndSections' :: forall section a blob. DataSourceSectionCloneable blob a section => ListViewDataSource' blob a section -> blob -> Maybe (Array SectionId) -> Maybe (Array (Array RowId)) -> ListViewDataSource' blob a section

#RowRenderer Source

data RowRenderer :: Type -> Type

#rowRenderer Source

rowRenderer :: forall a. (a -> ReactElement) -> RowRenderer a

#SectionRenderer Source

#sectionRenderer Source

sectionRenderer :: forall section. (section -> ReactElement) -> SectionRenderer section

#sectionRenderer' Source

sectionRenderer' :: forall section. (section -> SectionId -> ReactElement) -> SectionRenderer section

#SectionId Source

#RowId Source

type RowId = String