Skip to content
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

Document ListView.DataSource #410 #7193

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions Libraries/CustomComponents/ListView/ListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ var DEFAULT_SCROLL_CALLBACK_THROTTLE = 50;
/**
* ListView - A core component designed for efficient display of vertically
* scrolling lists of changing data. The minimal API is to create a
* `ListView.DataSource`, populate it with a simple array of data blobs, and
* instantiate a `ListView` component with that data source and a `renderRow`
* callback which takes a blob from the data array and returns a renderable
* component.
* [`ListView.DataSource`](docs/listviewdatasource.html), populate it with a simple
* array of data blobs, and instantiate a `ListView` component with that data
* source and a `renderRow` callback which takes a blob from the data array and
* returns a renderable component.
*
* Minimal example:
*
Expand Down Expand Up @@ -117,7 +117,9 @@ var ListView = React.createClass({
*/
propTypes: {
...ScrollView.propTypes,

/**
* An instance of [ListView.DataSource](docs/listviewdatasource.html) to use
*/
dataSource: PropTypes.instanceOf(ListViewDataSource).isRequired,
/**
* (sectionID, rowID, adjacentRowHighlighted) => renderable
Expand Down
12 changes: 7 additions & 5 deletions website/server/extractDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,13 @@ function isRunnable(componentName, componentPlatform) {

// Hide a component from the sidebar by making it return false from
// this function
function shouldDisplayInSidebar(componentName) {
if (componentName === 'Transforms') {
return false;
}
var HIDDEN_COMPONENTS = [
'Transforms',
'ListViewDataSource',
];

return true;
function shouldDisplayInSidebar(componentName) {
return HIDDEN_COMPONENTS.indexOf(componentName) === -1;
}

function getNextComponent(i) {
Expand Down Expand Up @@ -271,6 +272,7 @@ var apis = [
'../Libraries/LayoutAnimation/LayoutAnimation.js',
'../Libraries/Linking/Linking.js',
'../Libraries/LinkingIOS/LinkingIOS.js',
'../Libraries/CustomComponents/ListView/ListViewDataSource.js',
'../node_modules/react/lib/NativeMethodsMixin.js',
'../Libraries/Network/NetInfo.js',
'../node_modules/react/lib/PanResponder.js',
Expand Down