Skip to content
This repository has been archived by the owner on May 7, 2019. It is now read-only.

Pager component is having js warnings after react upgrade #202

Merged
merged 1 commit into from
Jan 17, 2019

Conversation

mikebigun
Copy link
Contributor

@mikebigun mikebigun commented Jan 17, 2019

This is a fix for the following warning:

image

This error is coming from every place with the Pager (Task Scheduler, Roles, Users...).

The most common reason is that application tries to modify the state for the unmounted component AND/OR for the component that is already mounted but rendered with nothing (like in our case).
To fix it, we just need to make sure Pager returns something while waiting for data, i.e. empty div. Once data prepared it will re-draw Pager component with all its structure.

Fixes #195

Copy link
Contributor

@valadas valadas left a comment

Choose a reason for hiding this comment

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

Looks good to me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants