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

Remove no data warning #711

Merged
merged 3 commits into from
Apr 12, 2022
Merged
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
3 changes: 0 additions & 3 deletions src/core/RecyclerListView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,6 @@ export default class RecyclerListView<P extends RecyclerListViewProps, S extends
this._processInitialOffset();
this._processOnEndReached();
this._checkAndChangeLayouts(this.props);
if (this.props.dataProvider.getSize() === 0) {
console.warn(Messages.WARN_NO_DATA); //tslint:disable-line
}
this._virtualRenderer.setOptimizeForAnimations(false);
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/constants/Constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const Constants: {[key: string]: string} = {
export const Constants = {
CONTEXT_PROVIDER_OFFSET_KEY_SUFFIX : "_offset",
CONTEXT_PROVIDER_LAYOUT_KEY_SUFFIX: "_layouts",
};
4 changes: 1 addition & 3 deletions src/core/constants/Messages.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
export const Messages: {[key: string]: string} = {
export const Messages = {
ERROR_LISTVIEW_VALIDATION : "missing datasource or layout provider, cannot proceed without it",
WARN_SCROLL_TO_INDEX: "scrollTo was called before RecyclerListView was measured, please wait for the mount to finish",
WARN_NO_DATA: "You have mounted RecyclerListView with an empty data provider (Size in 0). Please mount only if there is atleast one item " +
"to ensure optimal performance and to avoid unexpected behavior",
VISIBLE_INDEXES_CHANGED_DEPRECATED: "onVisibleIndexesChanged deprecated. Please use onVisibleIndicesChanged instead.",
ANIMATION_ON_PAGINATION: "Looks like you're trying to use RecyclerListView's layout animation render while doing pagination. " +
"This operation will be ignored to avoid creation of too many items due to developer error.",
Expand Down