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

version 3.1.2 (fixes) #1366

Merged
merged 7 commits into from Jun 22, 2020
Merged

version 3.1.2 (fixes) #1366

merged 7 commits into from Jun 22, 2020

Conversation

patorjk
Copy link
Collaborator

@patorjk patorjk commented Jun 22, 2020

This release would fix the following:

@coveralls
Copy link

coveralls commented Jun 22, 2020

Coverage Status

Coverage decreased (-0.3%) to 71.846% when pulling 996bf3a on v3_1_2 into 0a6d2a1 on master.

@patorjk patorjk merged commit 8fb338e into master Jun 22, 2020
Comment on lines +122 to +126
setTimeout(() => {
setHintTooltipOpen(false);
setSortTooltipOpen(false);
setDragging(true);
}, 0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you tell what this is❓

why use setTimeout..

ref : https://react-dnd.github.io/react-dnd/docs/api/use-drag

begin(monitor): Optional. Fired when a drag operation begins. Nothing needs to be returned, but if an object is returned it will override the default item property of the spec.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

An attempt to solve #1359 - I cannot reproduce that issue. I found this thread: react-dnd/react-dnd#1085 - it had a workaround that seemed related to what the guy was describing. Wrapping in setTimeout doesn't really have ill effects, it's just odd. I also can't reproduce #1363. I tried creating an example with other react-dnd componets but everything seems to work fine. I found this issue: react-dnd/react-dnd#1571 and it had a harmless solution so I added that in. Hopefully that will resolve the problem that guy is seeing.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@patorjk

Thanks for the kind explanation.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be okay to change to Immediately-invoked function expression.

I'll test it and tell you again

@patorjk patorjk deleted the v3_1_2 branch July 23, 2020 19:51
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.

None yet

3 participants