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

Prevent showLoadMore from causing setState error #1607

Merged
merged 1 commit into from
Feb 11, 2021

Conversation

rachaeldawn
Copy link
Contributor

  • Mimic the setValue signature by adding a hasMounted = true as a parameter at the end of updateQueryOptions
  • When checking props.showLoadMore, respond to whether or not the component has mounted by re-assigning state
  • Update the constructor to use the new parameter for updateQueryOptions

Result: using showLoadMore on MultiList should no longer throw setState errors.

This shouldn't have linting errors, as I have mimicked all of the code style to match the file, but I can't get the lint script to run without errors flooding my console that do not pertain to the code I have changed.

- Mimic the setValue signature by adding a `hasMounted = true` as a parameter at the end of updateQueryOptions
- When checking `props.showLoadMore`, respond to whether or not the component has mounted by re-assigning state
- Update the constructor to use the new parameter for updateQueryOptions
Copy link
Contributor

@bietkul bietkul left a comment

Choose a reason for hiding this comment

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

lgtm 👍

@bietkul bietkul merged commit b3259e7 into appbaseio:next Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants