@siemens/ngx-datatable
Version:
ngx-datatable is an Angular table grid component for presenting large and complex data.
32 lines (31 loc) • 1.38 kB
TypeScript
import { TableColumnInternal } from '../types/internal.types';
import { TableColumn } from '../types/table-column.type';
/**
* Calculates the Total Flex Grow
*/
export declare const getTotalFlexGrow: (columns: TableColumn[]) => number;
/**
* Adjusts the column widths.
* Inspired by: https://github.com/facebookarchive/fixed-data-table/blob/master/src/FixedDataTableWidthHelper.js
*/
export declare const adjustColumnWidths: (allColumns: TableColumnInternal[], expectedWidth: number) => void;
/**
* Forces the width of the columns to
* distribute equally but overflowing when necessary
*
* Rules:
*
* - If combined withs are less than the total width of the grid,
* proportion the widths given the min / max / normal widths to fill the width.
*
* - If the combined widths, exceed the total width of the grid,
* use the standard widths.
*
* - If a column is resized, it should always use that width
*
* - The proportional widths should never fall below min size if specified.
*
* - If the grid starts off small but then becomes greater than the size ( + / - )
* the width should use the original width; not the newly proportioned widths.
*/
export declare const forceFillColumnWidths: (allColumns: TableColumn[], expectedWidth: number, startIdx: number, allowBleed: boolean, defaultColWidth?: number, verticalScrollWidth?: number) => void;