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

Fixes for ListView #316

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
4 changes: 4 additions & 0 deletions src/components/ListView/ListViewDataSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ class ListViewDataSource {
return this._cachedRowCount;
}

getRowAndSectionCount(): number {
return (this._cachedRowCount + this.sectionIdentities.length);
}

/**
* Returns if the row is dirtied and needs to be rerendered
*/
Expand Down
3 changes: 2 additions & 1 deletion src/components/ListView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import ListViewDataSource from './ListViewDataSource';
import ListViewPropTypes from './ListViewPropTypes';
import ScrollView from '../ScrollView';
import StaticRenderer from '../StaticRenderer';
import React, { Component, isEmpty, merge } from 'react';
import React, { Component } from 'react';
import { isEmpty, merge } from 'lodash';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look over the commit history you'll see I removed lodash in favor of platform features and smaller alternatives

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I missed that change, it's removed now.

import requestAnimationFrame from 'fbjs/lib/requestAnimationFrame';

const DEFAULT_PAGE_SIZE = 1;
Expand Down