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

fix: sometimes changes to the draggable prop don't get propagated #994

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/google_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,9 @@ class GoogleMap extends Component {
}

shouldComponentUpdate(nextProps, nextState) {
// draggable does not affect inner components
return (
!shallowEqual(

Choose a reason for hiding this comment

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

seems to be working well for me

Copy link
Author

Choose a reason for hiding this comment

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

It's still not working for me. Does the sandbox in the PR description work for you?

When I check the draggable checkbox at the top, only the third map becomes draggable, but not the first two. I would expect these 2 to also be draggable.

omit(this.props, ['draggable']),
omit(nextProps, ['draggable'])
) || !shallowEqual(this.state, nextState)
!shallowEqual(this.props, nextProps) ||
!shallowEqual(this.state, nextState)
);
}

Expand Down