UNPKG

handsontable

Version:

Handsontable is a JavaScript Data Grid available for React, Angular and Vue.

20 lines (19 loc) 668 B
"use strict"; exports.__esModule = true; const command = exports.command = { name: 'moveCellSelectionToMostTopInlineStart', callback(hot) { const { selection, rowIndexMapper, columnIndexMapper } = hot; const fixedRows = parseInt(hot.getSettings().fixedRowsTop, 10); const fixedColumns = parseInt(hot.getSettings().fixedColumnsStart, 10); const row = rowIndexMapper.getNearestNotHiddenIndex(fixedRows, 1); const column = columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1); selection.markSource('keyboard'); selection.setRangeStart(hot._createCellCoords(row, column)); selection.markEndSource(); } };