setNewWidthForSelectedColumns()
Home > @gooddata/sdk-ui-pivot > setNewWidthForSelectedColumns
setNewWidthForSelectedColumns() function
Creates width item that will set width for all columns containing values of the provided measure. To prepare width items for columns in tables without measures, pass measureOrId as null
.
Signature:
export declare function setNewWidthForSelectedColumns(measuresOrIds: IMeasure | string | IMeasure[] | string[] | null, locators: (IAttributeColumnLocator | ITotalColumnLocator)[], width: number | "auto", allowGrowToFit?: boolean): IMeasureColumnWidthItem;
Parameters
Parameter | Type | Description |
---|---|---|
measuresOrIds | IMeasure | string | IMeasure[] | string[] | null | Measures specified either by value or by localId reference |
locators | (IAttributeColumnLocator | ITotalColumnLocator)[] | Attribute locators to narrow down selection |
width | number | "auto" | Width in pixels |
allowGrowToFit | boolean | (Optional) indicates whether the column is allowed to grow if the table's growToFit is enabled |
Returns:
Remarks
See also newAttributeColumnLocator() to learn more about the attribute column locators.