@univerjs/sheets v0.5.0-beta.1 • Docs
Function: getSheetCommandTarget()
function getSheetCommandTarget(univerInstanceService, params): Nullable<IResult>
Get targeted Workbook & Worksheet of a command. If unitId
and subUnitId
are given, the function would
try to get these instances. If not, it would try to get the current active instances.
Parameters
Parameter | Type | Description |
---|---|---|
univerInstanceService | IUniverInstanceService | - |
params | object | unitId and subUnitId |
params.subUnitId ? | string | The subUnitId of the Worksheet |
params.unitId ? | string | The unitId of the Workbook |
Returns
Nullable
<IResult
>
Targeted Workbook & Worksheet
Defined in
submodules/univer/packages/sheets/src/commands/commands/utils/target-util.ts:53