Skip to content

Commit dfb3eed

Browse files
committed
Mark optional props in README
1 parent d6bf50d commit dfb3eed

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,31 @@ npm i react-native-sortable-list --save
2323
### API
2424
#### Props
2525
- **data** (Object) data source
26-
- **order** (Array) an array of keys from data, the order of keys from the array will be used to initial rows order
27-
- **style** (Object, Array)
28-
- **contentContainerStyle** (Object, Array) these styles will be applied to the inner scroll view content container
29-
- **horizontal** (boolean) when true, the SortableList's children are arranged horizontally in a row instead of vertically in a column. The default value is false.
30-
- **sortingEnabled** (boolean) when false, rows are not sortable. The default value is true.
31-
- **scrollEnabled** (boolean) when false, the content does not scrollable. The default value is true.
32-
- **autoscrollAreaSize** (number) determines the height for vertical list and the width for horizontal list of the area at the begining and the end of the list that will trigger autoscrolling. Defaults to 60.<br />
33-
- **refreshControl** (element)<br />
26+
- **order?** (Array) an array of keys from data, the order of keys from the array will be used to initial rows order
27+
- **style?** (Object, Array)
28+
- **contentContainerStyle?** (Object, Array) these styles will be applied to the inner scroll view content container
29+
- **horizontal?** (boolean) when true, the SortableList's children are arranged horizontally in a row instead of vertically in a column. The default value is false.
30+
- **sortingEnabled?** (boolean) when false, rows are not sortable. The default value is true.
31+
- **scrollEnabled?** (boolean) when false, the content does not scrollable. The default value is true.
32+
- **autoscrollAreaSize?** (number) determines the height for vertical list and the width for horizontal list of the area at the begining and the end of the list that will trigger autoscrolling. Defaults to 60.<br />
33+
- **refreshControl?** (element)<br />
3434
A RefreshControl that works the same way as a ScrollView's refreshControl.
3535
- **renderRow** (function)<br />
3636
`({key, index, data, disabled, active}) => renderable`<br />
3737
Takes a row key, row index, data entry from the data source and its statuses disabled, active and should return a renderable component to be rendered as the row.<br />
38-
- **renderFooter** (function)<br />
38+
- **renderFooter?** (function)<br />
3939
`() => renderable`<br />
4040
Renders returned component at the bottom of the list.
41-
- **onChangeOrder** (function)<br />
41+
- **onChangeOrder?** (function)<br />
4242
`(nextOrder) => void`<br />
4343
Called when rows were reordered, takes an array of rows keys of the next rows order.
44-
- **onActivateRow** (function)<br />
44+
- **onActivateRow?** (function)<br />
4545
`(key) => void`<br />
4646
Called when a row was activated (user long tapped).
47-
- **onReleaseRow** (function)<br />
47+
- **onReleaseRow?** (function)<br />
4848
`(key) => void`<br />
4949
Called when the active row was released.
50-
- **onPressRow** (function)<br />
50+
- **onPressRow?** (function)<br />
5151
`(key) => void`<br />
5252
Called when a row was pressed.
5353

0 commit comments

Comments
 (0)