-
Notifications
You must be signed in to change notification settings - Fork 290
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
Fetch and Cache previous row heights #701
Merged
Merged
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1183988
exactScrollTopInCaseOfVariableRowHeights + example
daniela-buzatu 2d8f627
exactScrollTopInCaseOfVariableRowHeights
daniela-buzatu cdf908c
Remove exactScrollTopInCaseOfVariableRowHeights
daniela-buzatu 1b4279f
#701 PR review + tests for caching and updating the row heights when
daniela-buzatu 9c8509d
#701 PR review + tests for caching and updating the row heights when
daniela-buzatu 413d448
update documnetation for parameter updateRowHeights() method
daniela-buzatu a77028e
Add firstUpdatedRowIndex parameter to updateRowHeights in documentation
daniela-buzatu feb17e9
Remove a leftover console.log
daniela-buzatu 3a80d73
add isScrollTopExact property +
daniela-buzatu 08a6595
Fix tests after isScrollTopExact addition
daniela-buzatu 61afc4a
Fix small review remark
daniela-buzatu dac8d31
rename isScrollTopExact to isVerticalScrollExact
daniela-buzatu e61fb46
avoid passing isVerticalScrollExact as parameter, by adding it to state
daniela-buzatu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are calls to this function in other parts of the codebase where the third param is unspecified.
Some examples (but not limited to):
fixed-data-table-2/src/reducers/index.js
Line 204 in 6bd7bb8
fixed-data-table-2/src/actions/scrollActions.js
Line 59 in 6bd7bb8
fixed-data-table-2/src/plugins/ScrollContainer.js
Line 31 in 6bd7bb8
This has the risk that some workflows in the table (eg: uncontrolled scrolling) don't use exact row offsets even when
isVerticalScrollExact
is true.There's two approaches that I can immediately think of:
The first one is of course pass the prop
isVerticalScrollExact
in all these usages as the third param.But this can be a bit cumbersome cause some of the calls are nested within components.
The second one -- which I'm more inclined towards -- is to simply copy the
isVerticalScrollExact
prop to the redux store as part of "input" state (seesetStateFromProps()
) for similar cases.Once this is done, this reducer can simply query
state.isVerticalScrollExact
, thus avoiding the need for the caller to pass it explicitly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello!
Thank you for this observation. I have modified as you suggested in order to avoid passing
isVerticalScrollExact
but instead pass it via state. Now the row heights are computed also for theDynamicRowHeightExample
.Do you think it's ok now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, that works.