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.
Fixes #1063.
There were two main issues:
fixOffsetIfNeeded()
had been added intoupdateCanvasWidth
, so it was being called on every render. This means that it ran after thenextPage
action, and effectively reverted the pagination offset change because it doesn't know/care about pagination (only the selected tab)fixOffsetIfNeeded()
was settingthis.currentOffset
toundefined
in some situations, which then prevented pagination from working as it's used in calculationsIn order to address these issues, I've removed
fixOffsetIfNeeded()
fromupdateCanvasWidth
(it seems to be being called directly where needed already) and defaultednewOffset
tocurrentOffset
infixOffsetIfNeeded()
. I've done some manual testing in addition to running the automated tests, and all seems well.