Skip to content

Commit

Permalink
[DataGrid] Smoother resizing (#3072)
Browse files Browse the repository at this point in the history
* Fix #2381 by avoid reinitialize js method

* Fix DataGrid not resizing right when there is aside and ResizeType = null

* removed Wrog code

---------

Co-authored-by: Vincent Baaij <[email protected]>
  • Loading branch information
f4n0 and vnbaaij authored Dec 20, 2024
1 parent 0928f64 commit a48be2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Core/Components/DataGrid/FluentDataGrid.razor.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ export function enableColumnResizing(gridElement) {
let width;

if (document.body.dir === '' || document.body.dir === 'ltr') {
width = (horizontalScrollOffset + e.clientX) - headerBeingResized.offsetLeft;
width = (horizontalScrollOffset + e.clientX) - headerBeingResized.getClientRects()[0].x;
}
else {
width = headerBeingResized.offsetLeft + headerBeingResized.clientWidth - (horizontalScrollOffset + e.clientX);
width = headerBeingResized.getClientRects()[0].x + headerBeingResized.clientWidth - (horizontalScrollOffset + e.clientX);
}

const column = columns.find(({ header }) => header === headerBeingResized);
Expand Down

0 comments on commit a48be2f

Please sign in to comment.