こんにちは、みんな、
現時点ではあまりにも雑然としているため、特定のコード例を実際に投稿することはできませんが、問題を再現するために必要な手順を分離したと思います。
DragDropMonitor.prototype.canDropOnTargetでエラーがスローされました
targetIDのターゲットが見つからなかったためです(明らかに)。
ユースケース:並べ替え可能なツリーを構築していて、ドラッグしてホバーしたアイテムを再配置する必要があります
親ノードの後へ:
さらに言えば、エラーが発生しても、それでも機能します。
ありがとう!
+1私もこの問題を抱えています
問題を再現する例を提供してください。 その時、私は見ることができます。
これはおそらく2.1.0で修正されています。
閉店しますが、そうでない場合はお知らせください。再開します。
@gaearon最近react- 2.6.0
と3.0.2
正常に機能したようですが、 4.0.5
と5.0.0
壊れます。
これに関するニュースはありますか?
@gaearon更新はありますか?
ここで同じ問題
ここ5.0.0
でも同じ
ここで同じ問題
ここで同じ問題
同じ問題、修正のための提案はありますか?
誰かこれで運が良かったですか?
この問題は、react-sortable-tree外部ソースサンプルで発生します。 赤い領域にドラッグします。
https://frontend-collective.github.io/react-sortable-tree/?path=/story/advanced --drag-from-external-source
https://github.com/frontend-collective/react-sortable-tree/blob/master/stories/external-node.js
vendors~main.91acd83f50dfbcb80997.bundle.js:1 Uncaught Invariant Violation: Expected to find a valid target.
at module.exports (https://frontend-collective.github.io/react-sortable-tree/vendors~main.91acd83f50dfbcb80997.bundle.js:2:592)
at DragDropMonitorImpl.canDropOnTarget (https://frontend-collective.github.io/react-sortable-tree/vendors~main.91acd83f50dfbcb80997.bundle.js:2:186636)
at DropTargetMonitorImpl.canDrop (https://frontend-collective.github.io/react-sortable-tree/vendors~main.91acd83f50dfbcb80997.bundle.js:2:71541)
at https://frontend-collective.github.io/react-sortable-tree/main.91acd83f50dfbcb80997.bundle.js:1:132866
at DragDropContainer.getCurrentState (https://frontend-collective.github.io/react-sortable-tree/vendors~main.91acd83f50dfbcb80997.bundle.js:2:87049)
at DragDropContainer._this.handleChange (https://frontend-collective.github.io/react-sortable-tree/vendors~main.91acd83f50dfbcb80997.bundle.js:2:84210)
at handleChange (https://frontend-collective.github.io/react-sortable-tree/vendors~main.91acd83f50dfbcb80997.bundle.js:2:185746)
at dispatch (https://frontend-collective.github.io/react-sortable-tree/vendors~main.91acd83f50dfbcb80997.bundle.js:2:168058)
at Object.endDrag (https://frontend-collective.github.io/react-sortable-tree/vendors~main.91acd83f50dfbcb80997.bundle.js:2:199234)
at HTML5Backend.handleTopDragEndCapture (https://frontend-collective.github.io/react-sortable-tree/vendors~main.91acd83f50dfbcb80997.bundle.js:2:152270)
最も参考になるコメント
ここで同じ問題