-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ListView.DataSource] Comprehensive documentation & Sorting/Grouping #1880
Comments
👍 The react-native abstractions around ListView and the accompanying data source, are very hard to reason about when provided with zero documentation. |
+1! |
@ide @brentvatne /cc |
These examples should help anybody having trouble understanding how to deal ListView's dataSource. Rows: https://rnplay.org/apps/d3DM6A @brentvatne You can maybe take a look at these examples. If they are good enough you can maybe fork them over to the account for the examples and link them inside the docs. |
I'm going to say these don't help much more than the tutorial which doesn't show me anything but how to use a simple case of the datasource. Maybe the datasource has no other features...... Perhaps if you need more info, you could look at this https://github.com/facebook/react-native/blob/master/Libraries/CustomComponents/ListView/ListViewDataSource.js instead |
Duplicate of #410 |
@christopherdro I have to say those examples are brilliant! That solved my questions! Thank you very much!!! |
@christopherdro Well, it's a shame that I cannot copy the code from there though. |
@JO-WTF You can fork that example into your own account. |
@christopherdro It's alright. I got the idea, that's the point :) Thanks a lot. You have been really helpful. |
I was trying to understand how to work with
ListView.DataSource
;one of the key use case that I was interested in is sorting;
my list is a collection of names, grouped by first letter:
where should the sorting and grouping logic be?
assuming I want to keep the list sorted and be able to add/remove rows.
the docs offered very little guidance:
http://facebook.github.io/react-native/docs/listview.html#datasource
aside from the code example: http://facebook.github.io/react-native/docs/listview.html#examples
there was nothing really in the docs about the
ListView.DataSource
.the only thing close to a documentation, that I was able to find, was in the source:
https://github.com/facebook/react-native/blob/master/Libraries/CustomComponents/ListView/ListViewDataSource.js
another source that helped was:
http://www.reactnative.com/react-native-tutorial-for-creating-listview-with-section-headers/
but again, it was fairly limited.
so, I would like to suggest that
ListView.DataSource
be added to the docs (as a page of it's own)and include a few examples.
also, I think this a very common use case and should probably be included in the docs.
The text was updated successfully, but these errors were encountered: