Module

ReactNative.Components.ListView

Package
purescript-reactnative
Repository
doolse/purescript-reactnative

See ListView

#SectionId Source

#RowId Source

type RowId = String

#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 eff section a blob o. Optional o (ListViewPropsO section eff) => ListViewProps a section blob o -> ReactElement

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

#listViewDataSource Source

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

Create a ListViewDataSource from an Array

Uses reference equality for rowHasChanged

#sectionListViewDataSource Source

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

#listViewDataSource' Source

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

#cloneWithRows Source

#cloneWithRows' Source

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

#DataSourceRowCloneable Source

class DataSourceRowCloneable blob a | blob -> a

Instances

#DataSourceSectionCloneable Source

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

Instances

#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

#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

#ListViewDataSource' Source

#RowRenderer Source

data RowRenderer :: Type -> Type

#SectionRenderer Source

#rowRenderer Source

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

#rowRenderer' Source

rowRenderer' :: forall eff a. (a -> SectionId -> RowId -> EffFn2 eff SectionId RowId Unit -> ReactElement) -> RowRenderer a

#sectionRenderer Source

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

#sectionRenderer' Source

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