Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
tagoro9 wants to merge1 commit intogoogle-map-react:master
base:master
Choose a base branch
Loading
fromtagoro9:fix_draggable_updates

Conversation

tagoro9
Copy link

This pull request fixes an issue where a change to the draggable prop would not make the map draggable by not omitting the prop inside theshouldComponentUpdate prop.

If we change the prop but there is no other prop change the map behavior won't get updated, as that is done inside thecomponentDidUpdate function.

You can see the issue reproduced in this sandbox:https://codesandbox.io/s/distracted-wright-hrs51?file=/src/App.js

When you make the map draggable only the last map becomes draggable as there is another prop change, while the first 2 can't be dragged (the second one is expected as the code incomponentDidUpdate omits those).

Fixes#978

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.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@IAmBlackHackerIAmBlackHackerIAmBlackHacker left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Map options are not being updated.
2 participants
@tagoro9@IAmBlackHacker

[8]ページ先頭

©2009-2025 Movatter.jp