question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ListView.DataSource] Comprehensive documentation & Sorting/Grouping

See original GitHub issue

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:

A:
  Adam,
  Amy,
B:
  Ben,
  Bob
...

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.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
christopherdrocommented, Sep 13, 2015

These examples should help anybody having trouble understanding how to deal ListView’s dataSource.

Rows: https://rnplay.org/apps/d3DM6A Rows with Sections: https://rnplay.org/apps/xnyaYw

@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.

1reaction
JO-WTFcommented, May 25, 2016

@christopherdro It’s alright. I got the idea, that’s the point 😃

Thanks a lot. You have been really helpful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Listview datasource grouping in UI for ASP.NET MVC - Telerik
I'm sharing a datasource between a grid and listview. Everything works great - except when the user groups in the grid - the...
Read more >
What's New? — ObjectListView 2.9.1 documentation
Columns can now disable sorting, grouping, searching and “hide-ability” ( Sortable , Groupable Searchable and Hideable properties respectively). Breaking ...
Read more >
Achieve Outlook-Like Swiping Using .NET MAUI ListView
This blog explains how to achieve Outlook-like swiping using the Syncfusion .NET MAUI ListView control with code examples.
Read more >
SAP List Viewer with Integrated Data Access (ALV with IDA)
Contents SAP List Viewer with Integrated Data Access (ALV with IDA). ... The results of operations such as sorting, grouping, or filtering ...
Read more >
C# DataGridView sorting with Generic List as underlying source
Complete code to sort the column of datagridview whose datasource is a ... I work with myBindingSource at my own, I do sorting,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found