Skip to content

Commit 6f0a00e

Browse files
authored
Merge pull request #334 from Octopus-ITSM/master
Prevent Lane re-renders onDragEnd
2 parents 0dcfc00 + a0bccee commit 6f0a00e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/controllers/Lane.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ class Lane extends Component {
113113
onDragEnd = (laneId, result) => {
114114
const {handleDragEnd} = this.props
115115
const {addedIndex, payload} = result
116-
this.setState({isDraggingOver: false})
116+
117+
if (this.state.isDraggingOver) {
118+
this.setState({isDraggingOver: false})
119+
}
120+
117121
if (addedIndex != null) {
118122
const newCard = {...cloneDeep(payload), laneId}
119123
const response = handleDragEnd ? handleDragEnd(payload.id, payload.laneId, laneId, addedIndex, newCard) : true

0 commit comments

Comments
 (0)