feat: resizing in DataTable (#17973)

* feat: support resizing in data table

* wip

* clean up colors

* feat: resizable DataTable

* update implementation

* fix

* remove unused code

* improve dependency array

* enable resizing at DataTable level

* hide header label

* fix type error
This commit is contained in:
Eunjae Lee authored and GitHub committed 2024-12-09 08:26:02 +00:00
1 parent e559e7a46f
commit 5e95018870
4 files changed
+221 -64

No files matched your search

@@ -209,6 +209,7 @@ export function UserListTable() {
id: "select",
enableHiding: false,
enableSorting: false,
enableResizing: false,
size: 30,
meta: {
sticky: {
@@ -352,6 +353,8 @@ export function UserListTable() {
{
id: "actions",
enableHiding: false,
enableSorting: false,
enableResizing: false,
size: 80,
meta: {
sticky: { position: "right" },
@@ -389,6 +392,7 @@ export function UserListTable() {
data: flatData,
columns: memorisedColumns,
enableRowSelection: true,
columnResizeMode: "onChange",
debugTable: true,
manualPagination: true,
initialState: {
@@ -490,6 +494,7 @@ export function UserListTable() {
table={table}
tableContainerRef={tableContainerRef}
isPending={isPending}
enableColumnResizing={{ name: "UserListTable" }}
onScroll={(e) => fetchMoreOnBottomReached(e.target as HTMLDivElement)}>
<DataTableToolbar.Root className="lg:max-w-screen-2xl">
<div className="flex w-full flex-col gap-2 sm:flex-row">