From cf8a0b0a483c34bce89396a7b11b5afa55f22127 Mon Sep 17 00:00:00 2001 From: hoho2017 Date: Tue, 14 Mar 2023 16:17:16 +0800 Subject: [PATCH] fix(table): fix the layout/table moves when dragging elements to the right (#41139) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 稳定格式错乱啦 * Update drag-sorting-handler.tsx * Update drag-sorting-handler.tsx --------- Co-authored-by: zhanghaoqiang --- components/table/demo/drag-sorting-handler.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/table/demo/drag-sorting-handler.tsx b/components/table/demo/drag-sorting-handler.tsx index 1f3754cb99..5809c0b817 100644 --- a/components/table/demo/drag-sorting-handler.tsx +++ b/components/table/demo/drag-sorting-handler.tsx @@ -56,7 +56,10 @@ const Row = ({ children, ...props }: RowProps) => { const style: React.CSSProperties = { ...props.style, - transform: CSS.Transform.toString(transform && { ...transform, scaleY: 1 }), + transform: CSS.Transform.toString(transform && { ...transform, scaleY: 1 })?.replace( + /translate3d\(([^,]+),/, + 'translate3d(0,', + ), transition, ...(isDragging ? { position: 'relative', zIndex: 9999 } : {}), };