mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Tweak Add Column menu
Summary: Tweaking behavior of the unreleased Add Column menu per feedback from Anais and Dmitry. Test Plan: WIP Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D4089
This commit is contained in:
@@ -310,19 +310,17 @@ GridView.gridCommands = {
|
||||
// Re-define editField after fieldEditSave to make it take precedence for the Enter key.
|
||||
editField: function() { closeRegisteredMenu(); this.scrollToCursor(true); this.activateEditorAtCursor(); },
|
||||
|
||||
insertFieldBefore: function() {
|
||||
if (GRIST_NEW_COLUMN_MENU()) {
|
||||
insertFieldBefore: function(maybeKeyboardEvent) {
|
||||
if (GRIST_NEW_COLUMN_MENU() && !maybeKeyboardEvent) {
|
||||
this._openInsertColumnMenu(this.cursor.fieldIndex());
|
||||
} else {
|
||||
// FIXME: remove once New Column menu is enabled by default.
|
||||
this.insertColumn(null, {index: this.cursor.fieldIndex()});
|
||||
}
|
||||
},
|
||||
insertFieldAfter: function() {
|
||||
if (GRIST_NEW_COLUMN_MENU()) {
|
||||
insertFieldAfter: function(maybeKeyboardEvent) {
|
||||
if (GRIST_NEW_COLUMN_MENU() && !maybeKeyboardEvent) {
|
||||
this._openInsertColumnMenu(this.cursor.fieldIndex() + 1);
|
||||
} else {
|
||||
// FIXME: remove once New Column menu is enabled by default.
|
||||
this.insertColumn(null, {index: this.cursor.fieldIndex() + 1});
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user