Skip to content

Commit 167b69f

Browse files
jdaberkowjquense
authored andcommitted
perf: increase startup time of event dragging (jquense#1020)
1 parent 5857d8f commit 167b69f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/addons/dragAndDrop/withDragAndDrop.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export default function withDragAndDrop(Calendar) {
9797
weekWrapper: WeekWrapper,
9898
})
9999

100-
this.state = {}
100+
this.state = { interacting: false }
101101
}
102102

103103
getChildContext() {
@@ -118,7 +118,7 @@ export default function withDragAndDrop(Calendar) {
118118
}
119119

120120
handleInteractionStart = () => {
121-
this.setState({ interacting: true })
121+
if (this.state.interacting === false) this.setState({ interacting: true })
122122
}
123123

124124
handleInteractionEnd = interactionInfo => {

0 commit comments

Comments
 (0)