Skip to content

Commit

Permalink
[table-dev-app] feat: Add copy option to body context menu (#5720)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xRenegade authored Mar 8, 2023
1 parent 1c11468 commit c3f267f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/table-dev-app/src/mutableTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
Cell,
Column,
ColumnHeaderCell2,
CopyCellsMenuItem,
EditableCell2,
EditableName,
FocusedCellCoordinates,
Expand All @@ -55,6 +56,7 @@ import {
TruncatedPopoverMode,
Utils,
} from "@blueprintjs/table";
import { IMenuContext } from "@blueprintjs/table/src";
import type { ColumnIndices, RowIndices } from "@blueprintjs/table/src/common/grid";

import { DenseGridMutableStore } from "./denseGridMutableStore";
Expand Down Expand Up @@ -1109,9 +1111,10 @@ export class MutableTable extends React.Component<{}, IMutableTableState> {
return handleStringChange(value => this.setState({ [stateKey]: value }));
};

private renderBodyContextMenu = () => {
private renderBodyContextMenu = (context: IMenuContext) => {
const menu = (
<Menu>
<CopyCellsMenuItem context={context} icon="clipboard" getCellData={this.getCellValue} text="Copy" />
<MenuItem icon="search-around" text="Item 1" />
<MenuItem icon="search" text="Item 2" />
<MenuItem icon="graph-remove" text="Item 3" />
Expand Down

1 comment on commit c3f267f

@adidahiya
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[table-dev-app] feat: Add copy option to body context menu (#5720)

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

Please sign in to comment.