How to use the @blueprintjs/table/src.Regions.row 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 / features.tsx View on Github external
private selectedRegionTransform = (region: IRegion) => {
        // convert cell selection to row selection
        if (Regions.getRegionCardinality(region) === RegionCardinality.CELLS) {
            return Regions.row(region.rows[0], region.rows[1]);
        }

        return region;
    };
}
github palantir / blueprint / packages / table-dev-app / src / features.tsx View on Github external
ReactDOM.render(
    getTableComponent(
        200,
        100 * 1000,
        {},
        {
            enableGhostCells: true,
            selectionModes: SelectionModes.ALL,
        },
    ),
    document.getElementById("table-big"),
);

class RowSelectableTable extends React.Component<{}, {}> {
    public state = {
        selectedRegions: [Regions.row(2)],
    };

    public render() {
        return (
            <div>
                
                    
                    <table>
                    </table></div>
github palantir / blueprint / packages / table-dev-app / src / mutableTable.tsx View on Github external
private handleScrollToButtonClick = () => {
        const { scrollToRowIndex, scrollToColumnIndex, scrollToRegionType } = this.state;

        let region: IRegion;
        switch (scrollToRegionType) {
            case RegionCardinality.CELLS:
                region = Regions.cell(scrollToRowIndex, scrollToColumnIndex);
                break;
            case RegionCardinality.FULL_ROWS:
                region = Regions.row(scrollToRowIndex);
                break;
            case RegionCardinality.FULL_COLUMNS:
                region = Regions.column(scrollToColumnIndex);
                break;
            case RegionCardinality.FULL_TABLE:
                region = Regions.table();
                break;
            default:
                return;
        }

        this.tableInstance.scrollToRegion(region);
    };