handsontable
Version:
Handsontable is a JavaScript Data Grid available for React, Angular and Vue.
15 lines • 511 B
JavaScript
export const command = {
name: 'moveCellSelectionToMostInlineStart',
callback(hot) {
const {
selection,
columnIndexMapper
} = hot;
const fixedColumns = parseInt(hot.getSettings().fixedColumnsStart, 10);
const row = hot.getSelectedRangeActive().highlight.row;
const column = columnIndexMapper.getNearestNotHiddenIndex(fixedColumns, 1);
selection.markSource('keyboard');
selection.setRangeStart(hot._createCellCoords(row, column));
selection.markEndSource();
}
};