Skip to content

Commit

Permalink
[#1562] Grid > Improved column resize function (#1564)
Browse files Browse the repository at this point in the history
Co-authored-by: yell <yell@ex-em.com>
  • Loading branch information
kimyell and kimyell1023 authored Jan 31, 2024
1 parent 2a135b5 commit 399a29c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/components/grid/uses.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ export const resizeEvent = (params) => {
const minWidth = isRenderer(stores.orderedColumns[columnIndex])
? resizeInfo.rendererMinWidth : resizeInfo.minWidth;
const columnRect = columnEl.getBoundingClientRect();
const maxRight = bodyEl.getBoundingClientRect().right - headerLeft;
const resizeLineEl = elementInfo.resizeLine;
const minLeft = columnRect.left - headerLeft + minWidth;
const startLeft = columnRect.right - headerLeft;
Expand All @@ -324,9 +323,7 @@ export const resizeEvent = (params) => {
const handleMouseMove = (evt) => {
const deltaLeft = evt.clientX - startMouseLeft;
const proxyLeft = startLeft + deltaLeft;
let resizeWidth = Math.max(minLeft, proxyLeft);

resizeWidth = Math.min(maxRight, resizeWidth);
const resizeWidth = Math.max(minLeft, proxyLeft);

resizeLineEl.style.left = `${resizeWidth}px`;
};
Expand Down

0 comments on commit 399a29c

Please sign in to comment.