mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
Feat: rename all column label from a given row with right click (#848)
This commit is contained in:
@@ -8,6 +8,7 @@ const t = makeT('RowContextMenu');
|
||||
export interface IRowContextMenu {
|
||||
disableInsert: boolean;
|
||||
disableDelete: boolean;
|
||||
disableMakeHeadersFromRow: boolean;
|
||||
disableShowRecordCard: boolean;
|
||||
isViewSorted: boolean;
|
||||
numRows: number;
|
||||
@@ -16,6 +17,7 @@ export interface IRowContextMenu {
|
||||
export function RowContextMenu({
|
||||
disableInsert,
|
||||
disableDelete,
|
||||
disableMakeHeadersFromRow,
|
||||
disableShowRecordCard,
|
||||
isViewSorted,
|
||||
numRows
|
||||
@@ -51,6 +53,11 @@ export function RowContextMenu({
|
||||
menuItemCmd(allCommands.duplicateRows, t('Duplicate rows', { count: numRows }),
|
||||
dom.cls('disabled', disableInsert || numRows === 0)),
|
||||
);
|
||||
result.push(
|
||||
menuDivider(),
|
||||
menuItemCmd(allCommands.makeHeadersFromRow, t("Use as table headers"),
|
||||
dom.cls('disabled', disableMakeHeadersFromRow)),
|
||||
);
|
||||
result.push(
|
||||
menuDivider(),
|
||||
// TODO: should show `Delete ${num} rows` when multiple are selected
|
||||
|
||||
Reference in New Issue
Block a user