From daa60bdd880ecee47ddb44d7fc6e2c1a40a1f249 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Fri, 25 Jun 2021 18:14:24 +0300 Subject: [PATCH] [SSE mobile] Fix Bug 47962 --- apps/spreadsheeteditor/mobile/src/store/appOptions.js | 3 ++- apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/src/store/appOptions.js b/apps/spreadsheeteditor/mobile/src/store/appOptions.js index b426047ca2..ce4a99ec8f 100644 --- a/apps/spreadsheeteditor/mobile/src/store/appOptions.js +++ b/apps/spreadsheeteditor/mobile/src/store/appOptions.js @@ -71,7 +71,8 @@ export class storeAppOptions { } setPermissionOptions (document, licType, params, permissions, isSupportEditFeature) { - permissions.edit = params.asc_getRights() !== Asc.c_oRights.Edit ? false : true; + if (params.asc_getRights() !== Asc.c_oRights.Edit) + permissions.edit = false; this.canAutosave = true; this.canAnalytics = params.asc_getIsAnalyticsEnable(); this.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit); diff --git a/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx b/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx index c1439de246..9367e06a93 100644 --- a/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx @@ -1,6 +1,7 @@ import React, { useState } from 'react'; import { Input, View, Button, Link } from 'framework7-react'; +import {observer, inject} from "mobx-react"; const viewStyle = { height: 30 @@ -12,6 +13,8 @@ const contentStyle = { const CellEditorView = props => { const [expanded, setExpanded] = useState(false); + const storeAppOptions = props.storeAppOptions; + const isEdit = storeAppOptions.isEdit; const expandClick = e => { setExpanded(!expanded); @@ -20,7 +23,7 @@ const CellEditorView = props => { return @@ -33,4 +36,4 @@ const CellEditorView = props => { ; }; -export default CellEditorView; +export default inject("storeAppOptions")(observer(CellEditorView));