-
When I use useElementBounding and useDraggable together, the element position cannot be updated responsively after dragging the element. Can useElementBounding only be updated after the scrollbar and window changes? If I want to drag and drop to get element data, where do I need to change (add configuration) or there are other ready-made methods? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @hzlzsm! 👋 I'm here to help you with any bugs, questions, or contributions you might have. Let's work together to solve the issue you're facing. There are two similar closed issues related to your question, but neither provided a solution in the comments:
To address your issue, To ensure const { update } = useElementBounding(targetElementRef);
// Call this function after dragging ends
update(); This will recalculate the bounding box of the target element. You can call this To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Beta Was this translation helpful? Give feedback.
Hey @hzlzsm! 👋 I'm here to help you with any bugs, questions, or contributions you might have. Let's work together to solve the issue you're facing.
There are two similar closed issues related to your question, but neither provided a solution in the comments:
To address your issue,
useElementBounding
updates its values based on several conditions, such as resize and mutation observers, and window events like scroll and resize. However, it does not automatically update when the element is dragged usinguseDraggable
[3].To ensure
u…