UNPKG

@adaptabletools/adaptable

Version:

Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

28 lines (27 loc) 950 B
export const getFormatColumnSettingsViewItems = (formatColumn) => { let values = []; if (formatColumn.CellAlignment) { values.push(`Cell Alignment: ${formatColumn.CellAlignment}`); } if (formatColumn.RowScope) { if (formatColumn.RowScope.ExcludeDataRows) { values.push('Exclude Data Rows'); } if (formatColumn.RowScope.ExcludeGroupRows) { values.push('Exclude Group Rows'); } if (formatColumn.RowScope.ExcludeSummaryRows) { values.push('Exclude Summary Rows'); } if (formatColumn.RowScope.ExcludeTotalRows) { values.push('Exclude Total Rows'); } } if (formatColumn.ColumnGroupScope) { values.push(`Column Groups: ${formatColumn.ColumnGroupScope === 'Both' ? 'Always' : formatColumn.ColumnGroupScope}`); } return { name: 'Settings', values: values.filter(Boolean), }; };