jemise111 / react-native-swipe-list-view

A React Native ListView component with rows that swipe open and closed
https://www.npmjs.com/package/react-native-swipe-list-view
MIT License
2.79k stars 527 forks source link

Provide clarity on necessity of key property in the data array #437

Closed iKrushYou closed 4 years ago

iKrushYou commented 4 years ago

Thanks for submitting a pull request!

Please confirm you have linted your code and fixed any issues:

Please provide information on what your PR achieves and any issues that it addresses:

Fixes #434 There was previously no documentation surrounding the need for a key property in each of the objects in the data array. Without this property, the list doesn't function properly: the automatic closing of rows as a result of other interactions breaks.

jemise111 commented 4 years ago

Hey @iKrushYou, the keyExtractor is a prop of FlatList itself, not this library, so I don't think it needs to be added to the docs. If you want you can add a note underneath your comment in the readme directing people to this page: https://reactnative.dev/docs/flatlist#keyextractor

iKrushYou commented 4 years ago

@jemise111 ah man.. I did not know that :) That makes sense though. I will fix that!

iKrushYou commented 4 years ago

Okay, how about now?