Skip to content

Commit

Permalink
fix(draggable): wait for dom updated when props changed (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
RiESAEX committed May 20, 2022
1 parent d20fcf9 commit d52deed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/draggable/useDraggable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ export function useDraggable(
}
watch(containerRef, init, { immediate: true });
watch(propsRef, () => {
updateSettingStyle();
nextTick(() => {
updateSettingStyle();
});
});

function resetDragTarget() {
Expand Down

0 comments on commit d52deed

Please sign in to comment.