Skip to content

Commit cbb89a4

Browse files
author
Guillaume Chau
committed
docs: keyField in important notes
1 parent 73c072f commit cbb89a4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ export default {
151151
### Important notes
152152

153153
- ⚠️ You need to set the size of the virtual-scroller element and the items elements (for example, with CSS). Unless you are using [variable height mode](#variable-height-mode), all items should have the same height to prevent display glitches.
154+
- If the items are objects, the scroller needs to be able to identify them. By default it will look for an `id` field on the items. This can be configured with the `keyField` prop.
154155
- It is not recommended to use functional components inside RecycleScroller since the components are reused (so it will actually be slower).
155156
- The components used in the list should expect `item` prop change without being re-created (use computed props or watchers to properly react to props changes!).
156157
- You don't need to set `key` on list content (but you should on all nested `<img>` elements to prevent load glitches).

0 commit comments

Comments
 (0)