@univerjs/sheets v0.5.4


Function: getNextPrimaryCell()

function getNextPrimaryCell(
   selections, 
   direction, 
   worksheet): null | IRange

Defined in: submodules/univer/packages/sheets/src/services/selections/move-active-cell-util.ts:156

Get the next primary cell in the specified direction. If the primary cell not exists in selections, return null.

Parameters

ParameterTypeDescription
selectionsISelectionWithStyle[]The current selections.
directionDirectionThe direction to move the primary cell.The enum value is maybe one of the following: UP(0),RIGHT(1), DOWN(2), LEFT(3).
worksheetWorksheetThe worksheet instance.

Returns

null | IRange

The next primary cell.