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

Initial scrollTo* props fail to render #56

Merged
merged 4 commits into from
Oct 3, 2016
Merged

Initial scrollTo* props fail to render #56

merged 4 commits into from
Oct 3, 2016

Conversation

KamranAsif
Copy link
Contributor

Description

scrollToRow, scrollToColumn, scrollLeft and scrollTop were not correctly being used to calculate initial state. #52 attempted to fix this by storing as a temporary variable; but we can use the state object to determine if the props have changed.

Motivation and Context

#55
#52

How Has This Been Tested?

Added new unit tests and tested with dev server

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

@wcjordan
Copy link
Member

wcjordan commented Oct 3, 2016

lgtm and thanks for the test!

Do you have a summary of the approach / principles you want for handling the scroll setting? How does this fit them better than the alternative review?

@KamranAsif
Copy link
Contributor Author

Since we are already burdened by state, we should use it to compare the props. Ideally, there should be no properties on the instance as that will make the switch to redux difficult.

As a rule of thumb, throw things into state and run calculateState to always determine new output. That single function can be then broken up in redux land

@wcjordan
Copy link
Member

wcjordan commented Oct 3, 2016

Great, thanks for the explanation. Definitely glad to see local state moved into the state object.

@KamranAsif KamranAsif changed the title Initials scrollTo* props fail to render Initial scrollTo* props fail to render Oct 3, 2016
@KamranAsif KamranAsif merged commit a95551d into master Oct 3, 2016
@KamranAsif KamranAsif deleted the FDT-55 branch October 3, 2016 14:35
@IanVS
Copy link
Contributor

IanVS commented Oct 6, 2016

Thanks @KamranAsif and @wcjordan! Would love to see a release with this soon.

@KamranAsif
Copy link
Contributor Author

@IanVS We'll do a release when #58 is completed

@KamranAsif
Copy link
Contributor Author

@IanVS published 0.7.5 https://github.com/schrodinger/fixed-data-table-2/releases/tag/v0.7.5

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

Successfully merging this pull request may close these issues.

None yet

3 participants