How to use @blueprintjs/table - 10 common examples

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 HVF / franchise / src / cell / table.js View on Github external
intent={changed_value != raw_value ? Intent.WARNING : null}
                    onConfirm={async (value) =>
                        await db.updateStagingValue(value, result, rowIndex, colIndex, config)
                    }
                />
            )
        }

        return (
             castNull(result.values[row][col])}
                loadingOptions={
                    view.loading
                        ? [
                              TableLoadingOption.CELLS,
                              TableLoadingOption.COLUMN_HEADERS,
                              TableLoadingOption.ROW_HEADERS,
                          ]
                        : []
                }
            >
                {result.columns.map((name, colIndex) => (
                     (
                             <menu>
                                //     <menuitem> {

                                //         console.log('sort ascending', result)</menuitem></menu><table></table>
github HVF / franchise / src / cell / table.js View on Github external
onConfirm={async (value) =&gt;
                        await db.updateStagingValue(value, result, rowIndex, colIndex, config)
                    }
                /&gt;
            )
        }

        return (
             castNull(result.values[row][col])}
                loadingOptions={
                    view.loading
                        ? [
                              TableLoadingOption.CELLS,
                              TableLoadingOption.COLUMN_HEADERS,
                              TableLoadingOption.ROW_HEADERS,
                          ]
                        : []
                }
            &gt;
                {result.columns.map((name, colIndex) =&gt; (
                     (
                             <menu>
                                //     <menuitem> {

                                //         console.log('sort ascending', result)
                                //     }} text="Sort Asc" /&gt;</menuitem></menu><table></table>
github HVF / franchise / src / cell / table.js View on Github external
await db.updateStagingValue(value, result, rowIndex, colIndex, config)
                    }
                /&gt;
            )
        }

        return (
             castNull(result.values[row][col])}
                loadingOptions={
                    view.loading
                        ? [
                              TableLoadingOption.CELLS,
                              TableLoadingOption.COLUMN_HEADERS,
                              TableLoadingOption.ROW_HEADERS,
                          ]
                        : []
                }
            &gt;
                {result.columns.map((name, colIndex) =&gt; (
                     (
                             <menu>
                                //     <menuitem> {

                                //         console.log('sort ascending', result)
                                //     }} text="Sort Asc" /&gt;
                                //     <menuitem></menuitem></menuitem></menu><table></table>
github palantir / blueprint / packages / table-dev-app / src / features.tsx View on Github external
function getTableComponent(numCols: number, numRows: number, columnProps?: any, tableProps?: any) {
    // combine table overrides
    const getCellClipboardData = (row: number, col: number) =&gt; {
        return Utils.toBase26Alpha(col) + (row + 1);
    };

    const tablePropsWithDefaults = { numRows, getCellClipboardData, enableFocusedCell: true, ...tableProps };

    // combine column overrides
    const columnPropsWithDefaults = {
        cellRenderer: (rowIndex: number, columnIndex: number) =&gt; {
            return {Utils.toBase26Alpha(columnIndex) + (rowIndex + 1)};
        },
        ...columnProps,
    };
    const columns = Utils.times(numCols, index =&gt; {
        return ;
    });
    return {columns}<table></table>;
}
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 / 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
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 deptno / dynamon / src / components / react-deep-json-table / BlueprintDJT.tsx View on Github external
type="button"
            icon="maximize"
            disabled={rows === 0 || disabled.enter}
            onClick={this.enterJson}
          &gt;
            Enter JSON
          
          <button disabled="{step.length">Leave</button>
        
        <div style="{{clear:">
         console.log('handleOnSelect', x)}
          selectionModes={[RegionCardinality.CELLS]}
          rowHeaderCellRenderer={this.renderRowHeaderCell}
          enableColumnReordering
          enableFocusedCell
        &gt;
          {headers.map((header, i) =&gt;
            ,
          )}
        <table></table>
        <button disabled="">
      </button></div>
    )