Ivan - Fix drag and drop os-172 multiple topics [skip ci]

This commit is contained in:
ivan 2016-12-16 01:58:27 -03:00
parent e0d1fd0e40
commit 04f1d12e7d

View File

@ -139,12 +139,12 @@ class TopicViewer extends React.Component {
if(this.props.editable) { if(this.props.editable) {
_.extend(props, { _.extend(props, {
onDragOver: this.onItemDragOver.bind(this, article, index), onDragOver: (this.state.currentDraggedId) ? this.onItemDragOver.bind(this, article, index) : null,
onDrop: this.onItemDrop.bind(this, article, index), onDrop: (this.state.currentDraggedId) ? this.onItemDrop.bind(this, article, index) : null,
onDragStart: () => this.setState({currentDraggedId: article.id}), onDragStart: () => this.setState({currentDraggedId: article.id}),
onDragEnd: () => { onDragEnd: () => {
if(this.state.currentDraggedId) { if(this.state.currentDraggedId) {
this.setState({articles: this.props.articles}); this.setState({articles: this.props.articles, currentDraggedId: 0});
} }
} }
}); });