@invopop/popui 0.1.4-beta.33 → 0.1.4-beta.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79,6 +79,7 @@ export interface DataTableProps<TData> {
79
79
  onSortingChange?: (columnId: string, direction: 'asc' | 'desc') => void;
80
80
  onFilterChange?: (columnId: string) => void;
81
81
  onFreezeChange?: (columnId: string) => void;
82
+ onColumnResize?: (columnSizes: Record<string, number>) => void;
82
83
  getRowClassName?: (row: TData) => string;
83
84
  }
84
85
  export interface DataTablePaginationProps<T> {
@@ -62,6 +62,7 @@
62
62
  onSortingChange,
63
63
  onFilterChange,
64
64
  onFreezeChange,
65
+ onColumnResize,
65
66
  getRowClassName,
66
67
  children
67
68
  }: DataTableProps<TData> = $props()
@@ -156,7 +157,12 @@
156
157
  setColumnVisibility: (value) => (columnVisibility = value),
157
158
  setSorting: (value) => (sorting = value),
158
159
  setPagination: (value) => (pagination = value),
159
- setColumnSizing: (value) => (columnSizing = value),
160
+ setColumnSizing: (value) => {
161
+ columnSizing = value
162
+ if (onColumnResize && Object.keys(value).length > 0) {
163
+ onColumnResize(value)
164
+ }
165
+ },
160
166
  setColumnSizingInfo: (value) => (columnSizingInfo = value),
161
167
  setColumnOrder: (value) => (columnOrder = value)
162
168
  })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@invopop/popui",
3
3
  "license": "MIT",
4
- "version": "0.1.4-beta.33",
4
+ "version": "0.1.4-beta.34",
5
5
  "repository": {
6
6
  "url": "https://github.com/invopop/popui"
7
7
  },