List: Add a _notifyPageChanges function #3990
Merged
cschleiden merged 4 commits intomicrosoft:masterfrom Feb 16, 2018
Merged
Conversation
Contributor
|
Can you add a change file? |
cschleiden
approved these changes
Feb 15, 2018
| /** | ||
| * Notify consumers that the rendered pages have changed | ||
| * @param oldPages The old pages | ||
| * @param newPages The new pages |
| [index: number]: IPage; | ||
| } = {}; | ||
|
|
||
| for (let i = 0; i < oldPages.length; i++) { |
Contributor
There was a problem hiding this comment.
for (const page of oldPages) {?
| } | ||
| } | ||
|
|
||
| for (let i = 0; i < newPages.length; i++) { |
Contributor
There was a problem hiding this comment.
for (const page of newPages) {?
Contributor
There was a problem hiding this comment.
I see, just moved the code. Might be fine then.
added 2 commits
February 15, 2018 12:57
Markionium
added a commit
to Markionium/office-ui-fabric-react
that referenced
this pull request
Feb 18, 2018
* master: (71 commits) Applying package updates. Delete initials_2018-02-07-13-49.json Delete initials_2018-02-07-13-49.json Delete jolore-addingWorkWeekDateRange_2018-01-24-01-39.json Delete initials_2018-02-07-13-49.json Delete jolore-addingWorkWeekDateRange_2018-01-24-01-39.json Delete initials_2018-02-07-13-49.json Update .npmrc Cleaning Up Console Log in CommandBar Test (microsoft#4011) Convert Overlay to mergeStyles (microsoft#3978) ScrollablePane SCSS to MergeStyles Part 1: File Structure (microsoft#4008) [ContextualMenu] Fixes useTargetWidth property (microsoft#3943) DetailsList: Consider groups when setting aria-rowcount List: Add a _notifyPageChanges function (microsoft#3990) Applying package updates. Migrating Coachmark to main Package, Added a beak component and updated experiment PositioningContainer. (microsoft#3919) Update package.json Added enum for triggering menu with arrow keys and bool to allow it or not (microsoft#3950) BaseExtendedPicker: Hook up onPaste (microsoft#3885) FocusUtil: fix getPreviousElement to include previous sibling elements correctly (microsoft#3928) ...
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Pull request checklist
$ npm run changeDescription of changes
If the
getPageHeightproperty is provided to List, theonPageAddedandonPageRemovedcallbacks are never called.This is because these callbacks are called within the
updatePageMeasurementsfunction, which does not need to be called ifgetPageHeightis provided.The fix is to separate this logic into its own function,
_notifyPageChanges, which is called in the_updatePagesfunction