UNPKG

@eclipse-scout/core

Version:
66 lines 3.31 kB
import { Column, EventHandler, ObjectWithType, Table, TableColumnOrganizeActionEvent } from '../../index'; /** * If present on a table, allows adding, removing or modifying columns. If the table is customizable, * those functions are delegated to the table customizer. Otherwise, adding or removing a column * changes its `visible` flag, while modifying is currently not supported. * * Use {@link #install} to attach the table organizer to a table. This happens automatically when * the table organizer is defined on the {@link Table}. * * @see Table#organizer * @see TableHeaderMenu#_renderColumnActionsGroup * @see ShowInvisibleColumnsForm */ export declare class TableOrganizer implements ObjectWithType { objectType: string; table: Table; protected _columnOrganizeActionHandler: EventHandler<TableColumnOrganizeActionEvent>; constructor(); /** * Installs a listener for the `columnOrganizeAction` event on the given table. If the organizer is already * installed, an error is thrown. In most cases, it is not necessary to call this method manually. Consider * using {@link Table#setOrganizer} instead. */ install(table: Table): void; /** * Uninstalls the listener for the `columnOrganizeAction` event on the given table. If the organizer is not * installed, nothing happens. In most cases, it is not necessary to call this method manually. Consider * using {@link Table#setOrganizer} instead. */ uninstall(): void; /** * Returns a list of all currently invisible but displayable columns that can be added to the list of * visible columns by the table organizer. * * If a column is specified after which the selected columns are to be moved, the result will only include * columns that can be moved there without overtaking existing columns with `fixedPosition=true`. */ getInvisibleColumns(insertAfterColumn?: Column): Column[]; /** * Adds the given columns to the list of visible columns. If `insertAfterColumn` is set, the columns are * also moved after the specified column. Otherwise, they remain at their current position. */ showColumns<T>(columns: Column[], insertAfterColumn?: Column): void; /** * Hides the given column. If it was grouped, the grouping is removed. If it was part of a filter, the filter is removed. */ hideColumn(column: Column): void; /** * Returns true if there are addable columns according to {@link getInvisibleColumns}. */ isColumnAddable(insertAfterColumn?: Column): boolean; /** * Returns true if the given column can be removed form the table. */ isColumnRemovable(column: Column): boolean; /** * Returns true if the given column can be modified. */ isColumnModifiable(column: Column): boolean; protected _onColumnOrganizeAction(event: TableColumnOrganizeActionEvent): void; protected _handleColumnAddEvent(event: TableColumnOrganizeActionEvent): void; protected _showInvisibleColumnsForm(insertAfterColumn?: Column): void; protected _handleColumnRemoveEvent(event: TableColumnOrganizeActionEvent): void; protected _handleColumnModifyEvent(event: TableColumnOrganizeActionEvent): void; } //# sourceMappingURL=TableOrganizer.d.ts.map