Hello,
After selecting a specified range and adding non-editable permissions, the text that should have been displayed within that range disappeared... The permissions are now normal, but the text within the selected area has also been cleared.
` mypermissionId.value = generateTimestampWithRandomString();
const injector = univerRef.value?.getUniver().__getInjector();
const univerInstanceService = injector.get(IUniverInstanceService);
const commandService = injector.get(ICommandService);
const sheetSelectionManagerService = injector.get(SheetsSelectionsService);
const workbook = univerInstanceService.getCurrentUnitForType(
UniverInstanceType.UNIVER_SHEET
);
Hello, After selecting a specified range and adding non-editable permissions, the text that should have been displayed within that range disappeared... The permissions are now normal, but the text within the selected area has also been cleared. ` mypermissionId.value = generateTimestampWithRandomString(); const injector = univerRef.value?.getUniver().__getInjector(); const univerInstanceService = injector.get(IUniverInstanceService); const commandService = injector.get(ICommandService); const sheetSelectionManagerService = injector.get(SheetsSelectionsService); const workbook = univerInstanceService.getCurrentUnitForType( UniverInstanceType.UNIVER_SHEET );
if (!workbook) { return; }
const target = getSheetCommandTarget(univerInstanceService); if (!target) { return; } const { unitId, subUnitId } = target; const ranges = sheetSelectionManagerService .getCurrentSelections() .map((selection) => selection.range); console.log(AddRangeProtectionMutation.id); commandService.executeCommand(AddRangeProtectionMutation.id, { unitId, subUnitId, rules: [ { permissionId: mypermissionId.value, name: "sheet-01", unitType: 3, unitId, subUnitId, ranges, id: "rule1", viewStatus: "othersCanView", }, ], });`