Skip to content

Commit

Permalink
Make columns resize live instead of on drag end
Browse files Browse the repository at this point in the history
Issue #52
  • Loading branch information
qu1ck committed Jul 27, 2023
1 parent ba70e55 commit 4e3eafb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/components/tables/common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ function useTable<TData>(
onColumnVisibilityChange: setColumnVisibility,
onColumnOrderChange: setColumnOrder,
enableColumnResizing: true,
columnResizeMode: "onChange",
onColumnSizingChange: setColumnSizing,
enableSorting: true,
onSortingChange: setSorting,
Expand Down Expand Up @@ -394,11 +395,6 @@ function HeaderCell<TData>({ header, resizerOffset }: { header: Header<TData, un
onMouseDown: header.getResizeHandler(),
onTouchStart: header.getResizeHandler(),
className: `resizer ${header.column.getIsResizing() ? "isResizing" : ""}`,
style: {
transform: header.column.getIsResizing()
? `translateX(${resizerOffset ?? 0}px)`
: "",
},
}} >
{resizerOffset != null && <div className="resizer-guide" />}
</div>
Expand Down

0 comments on commit 4e3eafb

Please sign in to comment.