You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/flatlist.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ A performant interface for rendering simple, flat lists, supporting the most han
14
14
- Pull to Refresh.
15
15
- Scroll loading.
16
16
- ScrollToIndex support.
17
+
- Multiple column support.
17
18
18
19
If you need section support, use [`<SectionList>`](sectionlist.md).
19
20
@@ -26,6 +27,8 @@ Minimal Example:
26
27
/>
27
28
```
28
29
30
+
To render multiple columns, use the [`numColumns`](flatlist.md#numcolumns) prop. Using this approach instead of a `flexWrap` layout can prevent conflicts with the item height logic.
31
+
29
32
More complex, multi-select example demonstrating `PureComponent` usage for perf optimization and avoiding bugs.
30
33
31
34
- By binding the `onPressItem` handler, the props will remain `===` and `PureComponent` will prevent wasteful re-renders unless the actual `id`, `selected`, or `title` props change, even if the components rendered in `MyListItem` did not have such optimizations.
@@ -144,7 +147,7 @@ Also inherits [ScrollView Props](scrollview.md#props), unless it is nested in an
0 commit comments