Skip to content

Fix issue in modal Selection handling#3836

Merged
ThomasMichon merged 4 commits into
microsoft:masterfrom
ThomasMichon:selection-modal
Jan 31, 2018
Merged

Fix issue in modal Selection handling#3836
ThomasMichon merged 4 commits into
microsoft:masterfrom
ThomasMichon:selection-modal

Conversation

@ThomasMichon

@ThomasMichon ThomasMichon commented Jan 30, 2018

Copy link
Copy Markdown
Member

Overview

This change fixes in issue where use of _setChangeEvents in Selection was incorrectly flipped when handling the modal selection state. This causes change notifications to fail in downstream UX.
This change also fixed an issue where touch events were not properly triggering the modal selection state in some edge cases.

@ThomasMichon ThomasMichon self-assigned this Jan 31, 2018
public setModal(isModal: boolean): void {
if (this._isModal !== isModal) {
this.setChangeEvents(true);
this.setChangeEvents(false);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would you mind adding a comment as to why this is necessary?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Do you want the comment in all the other places?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I should have looked more closely. For some reason I thought this was the only place the change should occur. Ignore this!

private _forceListUpdates() {
this._pendingForceUpdate = false;

if (this._groupedList) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Part of me feels like we should make forceUpdate a property that gets passed down to the grouped/list so that it maintains the lifecycle better. Probably doesn't need to be done now.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We should get rid of forceUpdate.

@ThomasMichon ThomasMichon merged commit c304b01 into microsoft:master Jan 31, 2018
gokunymbus added a commit that referenced this pull request Feb 1, 2018
gokunymbus added a commit that referenced this pull request Feb 1, 2018
* Revert "Updating config files in @uifabric/icons package (#3851)"

This reverts commit 952ad79.

* Revert "Addressing Issue #3776 - Sticky component loops forever if background-color is not set for page (#3833)"

This reverts commit ddc5440.

* Revert "Fix issue in modal Selection handling (#3836)"

This reverts commit c304b01.

* Revert "Adding new WOFF files to the @uifabric/icons/fonts folder (#3848)"

This reverts commit 66a91aa.

* Revert "Controlled TextFields (#3796)"

This reverts commit b17a45f.
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
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.

3 participants