Skip to content
Pavlo Aksonov edited this page Aug 19, 2015 · 4 revisions

Welcome to the react-native-tableview wiki!

TableView attributes

  • selectedValue (optional) - value to select. TableView.Cell which have 'value' the same as selectedValue will be marked with "checkmark". Also the component will scroll to this cell to make it visible.
  • onPress(event) - event handler raised after selecting cell. Event attributes
    • selectedIndex - index of selected cell
    • selectedSection - index of selected section
    • value - value of selected cell (optionally, cell contains 'value' attribute)
    • also event contains all key/values of selected cell, so user could put some custom attributes into cells.

TableView children structure

<TableView.Section ..section params... >
   <TableView.Item ..cell attributes.. >Item1</TableView.Item>
   <TableView.Item ..cell attributes.. >Item2</TableView.Item>
   <TableView.Item ..cell attributes.. >Item3</TableView.Item>
   <TableView.Item ..cell attributes.. >Item4</TableView.Item>
</TableView.Section>

**TableView.Section attributes:

  • label - text for section header

**TableView.Item attributes:

  • label - text for cell text label
  • detail - text for cell detail label
  • value - value for cell
  • selected - bool value indicated that cell should be 'marked' with checkmark (i.e. selected)
Clone this wiki locally