Skip to content

Commit f02fe89

Browse files
committed
UI: Table - add option to resize columns width
1 parent 5c4d899 commit f02fe89

25 files changed

+1994
-1785
lines changed

dist/cjs/index.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cjs/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cjs/types/components/Table/Table.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ interface TableProps<Data extends Record<string, unknown>> {
9191
groupBy?: string[];
9292
hasCustomDateFormat?: boolean;
9393
customDateFormat?: string;
94+
hasResizableColumns?: boolean;
95+
hasEmptyActionsCell?: boolean;
9496
}
95-
declare function Table<Values extends Record<string, unknown>>({ columns, data, rowActions, tableActions, title, defaultSort, globalFilter, defaultGlobalFilter, checkRowSelected, checkRowHighlighted, getRowId, addFilterToUrl, RowSubComponent, listenerPrefix, onRowClick, miniTable, filterCategory, fixedPageSize, disableActionsPortal, maxRows, emptyMessage, colPropForShowColumns, manualPagination, itemsAmount, canExpandAll, loading, onFiltersChanged, defaultDescendingSort, customRowActions, manualFilters, extraClasses, initialFilters: initialUserFilters, groupBy, hasCustomDateFormat, customDateFormat }: TableProps<Values>): JSX.Element;
97+
declare function Table<Values extends Record<string, unknown>>({ columns, data, rowActions, tableActions, title, defaultSort, globalFilter, defaultGlobalFilter, checkRowSelected, checkRowHighlighted, getRowId, addFilterToUrl, RowSubComponent, listenerPrefix, onRowClick, miniTable, filterCategory, fixedPageSize, disableActionsPortal, maxRows, emptyMessage, colPropForShowColumns, manualPagination, itemsAmount, canExpandAll, loading, onFiltersChanged, defaultDescendingSort, customRowActions, manualFilters, extraClasses, initialFilters: initialUserFilters, groupBy, hasCustomDateFormat, customDateFormat, hasResizableColumns, hasEmptyActionsCell }: TableProps<Values>): JSX.Element;
9698
declare const _default: React.MemoExoticComponent<typeof Table>;
9799
export default _default;

dist/cjs/types/consts.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ export declare const TAG_SEPARATOR = ",";
44
export declare const SAVED_FILTERS = "saved_filters";
55
export declare const EXPLICITLY_REMOVED_FILTERS = "explicitly_removed_filters";
66
export declare const SAVED_HIDDEN = "saved_hidden";
7+
export declare const SAVED_RESIZED = "saved_resized";
8+
export declare const SAVED_RESIZING_ENABLED = "saved_resizing_enabled";
79
export declare const FILTER_CHANGE_LISTENER = "table-filters-change";
810
export declare const FILTER_LISTENER = "table-filters";
911
export declare const GENERAL_ERROR = "Something went wrong. Please refresh the page and try again.";
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1+
interface ColumnResizing {
2+
startX?: number | undefined;
3+
columnWidth: number;
4+
headerIdWidths: Record<string, number>;
5+
columnWidths: any;
6+
isResizingColumn?: string | undefined;
7+
}
18
declare const localStorageService: {
29
setItem(key: string, item: string | boolean): void;
310
getItem(key: string): string | null;
411
removeItem(key: string): void;
512
updateFilters(key: string, value: any): void;
613
updateHidden(key: string, value: any): void;
14+
updateResized(category: string, resizing: ColumnResizing): void;
15+
updateResizedEnabled(category: string, isResizedEnabled: boolean): void;
716
};
817
export default localStorageService;

dist/cjs/types/svgs/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ export { ReactComponent as ThinArrow } from './079-arrow-12.svg';
2828
export { ReactComponent as User } from './017-user-16.svg';
2929
export { ReactComponent as Weka } from './043-weka-16.svg';
3030
export { ReactComponent as CheckMark } from './016-checkmark-10.svg';
31+
export { ReactComponent as ColumnResize } from './188-column-resize-enable-16.svg';
32+
export { ReactComponent as ColumnResizeReset } from './189-column-resize-reset-16.svg';

dist/esm/index.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/esm/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/esm/types/components/Table/Table.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ interface TableProps<Data extends Record<string, unknown>> {
9191
groupBy?: string[];
9292
hasCustomDateFormat?: boolean;
9393
customDateFormat?: string;
94+
hasResizableColumns?: boolean;
95+
hasEmptyActionsCell?: boolean;
9496
}
95-
declare function Table<Values extends Record<string, unknown>>({ columns, data, rowActions, tableActions, title, defaultSort, globalFilter, defaultGlobalFilter, checkRowSelected, checkRowHighlighted, getRowId, addFilterToUrl, RowSubComponent, listenerPrefix, onRowClick, miniTable, filterCategory, fixedPageSize, disableActionsPortal, maxRows, emptyMessage, colPropForShowColumns, manualPagination, itemsAmount, canExpandAll, loading, onFiltersChanged, defaultDescendingSort, customRowActions, manualFilters, extraClasses, initialFilters: initialUserFilters, groupBy, hasCustomDateFormat, customDateFormat }: TableProps<Values>): JSX.Element;
97+
declare function Table<Values extends Record<string, unknown>>({ columns, data, rowActions, tableActions, title, defaultSort, globalFilter, defaultGlobalFilter, checkRowSelected, checkRowHighlighted, getRowId, addFilterToUrl, RowSubComponent, listenerPrefix, onRowClick, miniTable, filterCategory, fixedPageSize, disableActionsPortal, maxRows, emptyMessage, colPropForShowColumns, manualPagination, itemsAmount, canExpandAll, loading, onFiltersChanged, defaultDescendingSort, customRowActions, manualFilters, extraClasses, initialFilters: initialUserFilters, groupBy, hasCustomDateFormat, customDateFormat, hasResizableColumns, hasEmptyActionsCell }: TableProps<Values>): JSX.Element;
9698
declare const _default: React.MemoExoticComponent<typeof Table>;
9799
export default _default;

dist/esm/types/consts.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ export declare const TAG_SEPARATOR = ",";
44
export declare const SAVED_FILTERS = "saved_filters";
55
export declare const EXPLICITLY_REMOVED_FILTERS = "explicitly_removed_filters";
66
export declare const SAVED_HIDDEN = "saved_hidden";
7+
export declare const SAVED_RESIZED = "saved_resized";
8+
export declare const SAVED_RESIZING_ENABLED = "saved_resizing_enabled";
79
export declare const FILTER_CHANGE_LISTENER = "table-filters-change";
810
export declare const FILTER_LISTENER = "table-filters";
911
export declare const GENERAL_ERROR = "Something went wrong. Please refresh the page and try again.";

0 commit comments

Comments
 (0)