mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Migrating commands to typescript
Summary: Migrating commands and commandList to typescript Test Plan: Existing Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3871
This commit is contained in:
@@ -433,13 +433,13 @@ export class GristDoc extends DisposableWithEvents {
|
||||
|
||||
/* Command binding */
|
||||
this.autoDispose(commands.createGroup({
|
||||
undo(this: GristDoc) { this._undoStack.sendUndoAction().catch(reportError); },
|
||||
redo(this: GristDoc) { this._undoStack.sendRedoAction().catch(reportError); },
|
||||
reloadPlugins() { this.docComm.reloadPlugins().then(() => G.window.location.reload(false)); },
|
||||
undo() { this._undoStack.sendUndoAction().catch(reportError); },
|
||||
redo() { this._undoStack.sendRedoAction().catch(reportError); },
|
||||
reloadPlugins() { void this.docComm.reloadPlugins().then(() => G.window.location.reload(false)); },
|
||||
|
||||
// Command to be manually triggered on cell selection. Moves the cursor to the selected cell.
|
||||
// This is overridden by the formula editor to insert "$col" variables when clicking cells.
|
||||
setCursor(this: GristDoc, rowModel: BaseRowModel, fieldModel?: ViewFieldRec) {
|
||||
setCursor(rowModel: BaseRowModel, fieldModel?: ViewFieldRec) {
|
||||
return this.setCursorPos({
|
||||
rowIndex: rowModel?._index() || 0,
|
||||
fieldIndex: fieldModel?._index() || 0,
|
||||
|
||||
Reference in New Issue
Block a user