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

Fixed an issue that was causing adaptive card focus to be blurred whe… #2090

Merged
merged 1 commit into from
Mar 5, 2020

Conversation

tonyanziano
Copy link
Contributor

@tonyanziano tonyanziano commented Mar 5, 2020

…n clicking an activity.

===

Fixes a regression of #1683

===

The problem:

When react-redux's mapStateToProps returns an object with the newest version of a component's props, it does a shallow compare (===) of each of the new props' values with the previous props' values and if any of them return false, then it re-renders the component. Read more here.

Since currentUser was being assigned to a new object ever time mapStateToProps was run, even though the previous currentUser and the new one had the same key/value pairs.

@srinaath
Copy link
Contributor

srinaath commented Mar 5, 2020

Awesome fix @tonyanziano

@tonyanziano tonyanziano merged commit 5ca8253 into master Mar 5, 2020
@tonyanziano tonyanziano deleted the toanzian/card-rerender-fix branch March 5, 2020 00:50
@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 68.154% when pulling e7d0089 on toanzian/card-rerender-fix into e92279e on master.

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

Successfully merging this pull request may close these issues.

3 participants