From 4619c07aac7913d8b8ad2a0d2e87c4b97819ab49 Mon Sep 17 00:00:00 2001 From: Christian Kosmowski Date: Tue, 9 Dec 2014 11:59:55 +0100 Subject: [PATCH 1/2] - Added the public function "editActiveCell" to make it possible to trigger editing the active cell from the outside i.e. if an external contextmenu is used to trigger editing entries this is needed --- src/doby-grid.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/doby-grid.js b/src/doby-grid.js index 0d2e963..32982a6 100644 --- a/src/doby-grid.js +++ b/src/doby-grid.js @@ -3494,6 +3494,16 @@ var DobyGrid = function (options) { } }; + /** + * Edit the currently active cell (if the table, the column, and the item is editable) + * @method editActiveCell + * @memberof DobyGrid + * + * @param {function} editor - Editor factory to use + */ + this.editActiveCell = function (editor) { + makeActiveCellEditable(editor); + }; /** * Given a set of columns, make sure 'minWidth <= width <= maxWidth From 4d220efa197fd85381d231f0bd58a136092d0146 Mon Sep 17 00:00:00 2001 From: Christian Kosmowski Date: Thu, 18 Dec 2014 09:05:16 +0100 Subject: [PATCH 2/2] Added a better description for editor parameters --- src/doby-grid.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doby-grid.js b/src/doby-grid.js index 32982a6..434b75a 100644 --- a/src/doby-grid.js +++ b/src/doby-grid.js @@ -3499,7 +3499,7 @@ var DobyGrid = function (options) { * @method editActiveCell * @memberof DobyGrid * - * @param {function} editor - Editor factory to use + * @param {function} [editor] - Editor factory to use. By default will use global editor. */ this.editActiveCell = function (editor) { makeActiveCellEditable(editor); @@ -6293,7 +6293,7 @@ var DobyGrid = function (options) { * @memberof DobyGrid * @private * - * @param {function} editor - Editor factory to use + * @param {function} [editor] - Editor factory to use. By default will use global editor. */ makeActiveCellEditable = function (editor) { if (!self.active || !self.active.node || self.options.editable !== true) return;