我有一个Draggable组件,其中有一个容器。我希望在停止拖动时重设Draggable的位置(onStop)。这是我的Draggable的属性:
Draggable
onStop
<Draggable axis="x" bounds={{top: 0, bottom: 0, left: -75, right: 0}} onStop={//what to do here} >
我该怎么做?
所以,我进行了研究,您可以只使用position={{x: 0, y: 0}}使它起作用。
position={{x: 0, y: 0}}