diff --git a/apps/spreadsheeteditor/mobile/src/store/appOptions.js b/apps/spreadsheeteditor/mobile/src/store/appOptions.js index b426047ca..ce4a99ec8 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 c1439de24..9367e06a9 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
{props.cellName} - {props.onClickToOpenAddOptions('function', '#idx-btn-function');}}> + {props.onClickToOpenAddOptions('function', '#idx-btn-function');}}>
@@ -33,4 +36,4 @@ const CellEditorView = props => {
; }; -export default CellEditorView; +export default inject("storeAppOptions")(observer(CellEditorView));