How to use the @blueprintjs/table/src.Regions.cell 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 getStyledRegionGroups() {
        // show 3 styled regions as samples
        return !this.state.showCustomRegions
            ? []
            : ([
                  {
                      className: "tbl-styled-region-success",
                      regions: [Regions.cell(0, 0, 3, 3)],
                  },
                  {
                      className: "tbl-styled-region-warning",
                      regions: [Regions.cell(2, 1, 8, 1)],
                  },
                  {
                      className: "tbl-styled-region-danger",
                      regions: [Regions.cell(5, 3, 7, 7)],
                  },
              ] as IStyledRegionGroup[]);
    }
}
github palantir / blueprint / packages / table-dev-app / src / mutableTable.tsx View on Github external
private getStyledRegionGroups() {
        // show 3 styled regions as samples
        return !this.state.showCustomRegions
            ? []
            : ([
                  {
                      className: "tbl-styled-region-success",
                      regions: [Regions.cell(0, 0, 3, 3)],
                  },
                  {
                      className: "tbl-styled-region-warning",
                      regions: [Regions.cell(2, 1, 8, 1)],
                  },
                  {
                      className: "tbl-styled-region-danger",
                      regions: [Regions.cell(5, 3, 7, 7)],
                  },
              ] as IStyledRegionGroup[]);
    }
}
github palantir / blueprint / packages / table-dev-app / src / mutableTable.tsx View on Github external
private getStyledRegionGroups() {
        // show 3 styled regions as samples
        return !this.state.showCustomRegions
            ? []
            : ([
                  {
                      className: "tbl-styled-region-success",
                      regions: [Regions.cell(0, 0, 3, 3)],
                  },
                  {
                      className: "tbl-styled-region-warning",
                      regions: [Regions.cell(2, 1, 8, 1)],
                  },
                  {
                      className: "tbl-styled-region-danger",
                      regions: [Regions.cell(5, 3, 7, 7)],
                  },
              ] as IStyledRegionGroup[]);
    }
}
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);
    };
github palantir / blueprint / packages / table-dev-app / src / features.tsx View on Github external
);

ReactDOM.render(
    getTableComponent(
        3,
        7,
        {
            columnHeaderCellRenderer: (columnIndex: number) => {
                return ;
            },
        },
        {
            styledRegionGroups: [
                {
                    className: "my-group",
                    regions: [Regions.cell(0, 0), Regions.row(2), Regions.cell(1, 2, 5, 2)],
                },
            ],
        },
    ),
    document.getElementById("table-5"),
);

ReactDOM.render(
    getTableComponent(
        10,
        70,
        {
            columnHeaderCellRenderer: (columnIndex: number) => {
                const alpha = Utils.toBase26Alpha(columnIndex);
                return (