How to use the @blueprintjs/table/src.TruncatedPopoverMode.WHEN_TRUNCATED function in @blueprintjs/table

To help you get started, we’ve selected a few @blueprintjs/table examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github palantir / blueprint / packages / table-dev-app / src / mutableTable.tsx View on Github external
private toTruncatedPopoverModeLabel(truncatedPopoverMode: TruncatedPopoverMode) {
        switch (truncatedPopoverMode) {
            case TruncatedPopoverMode.ALWAYS:
                return "Always";
            case TruncatedPopoverMode.NEVER:
                return "Never";
            case TruncatedPopoverMode.WHEN_TRUNCATED:
                return "When truncated";
            case TruncatedPopoverMode.WHEN_TRUNCATED_APPROX:
                return "Truncated approx";
            default:
                return "";
        }
    }
github palantir / blueprint / packages / table-dev-app / src / mutableTable.tsx View on Github external
SelectedRegionTransformPreset.CELL,
    SelectedRegionTransformPreset.ROW,
    SelectedRegionTransformPreset.COLUMN,
];

const CELL_CONTENTS: CellContent[] = [
    CellContent.EMPTY,
    CellContent.CELL_NAMES,
    CellContent.LONG_TEXT,
    CellContent.LARGE_JSON,
];

const TRUNCATED_POPOVER_MODES: TruncatedPopoverMode[] = [
    TruncatedPopoverMode.ALWAYS,
    TruncatedPopoverMode.NEVER,
    TruncatedPopoverMode.WHEN_TRUNCATED,
    TruncatedPopoverMode.WHEN_TRUNCATED_APPROX,
];

const TRUNCATION_LENGTHS: number[] = [20, 80, 100, 1000];
const TRUNCATION_LENGTH_DEFAULT_INDEX = 1;

const SLOW_LAYOUT_STACK_DEPTH = 120;

const COLUMN_COUNT_DEFAULT_INDEX = 3;
const ROW_COUNT_DEFAULT_INDEX = 4;

const FROZEN_COLUMN_COUNT_DEFAULT_INDEX = 0;
const FROZEN_ROW_COUNT_DEFAULT_INDEX = 0;

const LONG_TEXT_MIN_LENGTH = 5;
const LONG_TEXT_MAX_LENGTH = 120;
github palantir / blueprint / packages / table-dev-app / src / mutableTable.tsx View on Github external
showCellsLoading?: boolean;
    showColumnHeadersLoading?: boolean;
    showColumnMenus?: boolean;
    showCustomRegions?: boolean;
    showFocusCell?: boolean;
    showGhostCells?: boolean;
    showInline?: boolean;
    showRowHeaders?: boolean;
    showRowHeadersLoading?: boolean;
    showTableInteractionBar?: boolean;
    showZebraStriping?: boolean;
}

const DEFAULT_STATE: IMutableTableState = {
    cellContent: CellContent.LONG_TEXT,
    cellTruncatedPopoverMode: TruncatedPopoverMode.WHEN_TRUNCATED,
    cellTruncationLength: TRUNCATION_LENGTHS[TRUNCATION_LENGTH_DEFAULT_INDEX],
    enableCellEditing: false,
    enableCellSelection: true,
    enableCellTruncation: false,
    enableCellTruncationFixed: false,
    enableCellWrap: false,
    enableColumnCustomHeaders: true,
    enableColumnNameEditing: false,
    enableColumnReordering: true,
    enableColumnResizing: true,
    enableColumnSelection: true,
    enableContextMenu: false,
    enableFullTableSelection: true,
    enableLayoutBoundary: false,
    enableMultiSelection: true,
    enableRowReordering: false,