UNPKG

handsontable

Version:

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

20 lines (19 loc) 608 B
"use strict"; exports.__esModule = true; const command = exports.command = { name: 'moveCellSelectionToMostLeft', callback(hot) { const { selection, columnIndexMapper } = hot; const row = hot.getSelectedRangeActive().highlight.row; let column = columnIndexMapper.getNearestNotHiddenIndex(...(hot.isRtl() ? [hot.countCols() - 1, -1] : [0, 1])); if (column === null) { column = hot.isRtl() ? -1 : -hot.countRowHeaders(); } selection.markSource('keyboard'); selection.setRangeStart(hot._createCellCoords(row, column)); selection.markEndSource(); } };