[SSE] Fix Bug 52947

This commit is contained in:
ShimaginAndrey 2021-10-05 16:36:25 +03:00
parent acd44354ee
commit f4010ee3d4
3 changed files with 14 additions and 3 deletions

View file

@ -395,6 +395,8 @@ class MainController extends Component {
storeFocusObjects.setEditFormulaMode(isFormula);
}
}
storeFocusObjects.setFunctionsDisabled(state === Asc.c_oAscCellEditorState.editText);
});
}

View file

@ -19,7 +19,9 @@ export class storeFocusObjects {
editFormulaMode: observable,
setEditFormulaMode: action,
isEditCell: observable,
setEditCell: action
setEditCell: action,
functionsDisable: observable,
setFunctionsDisabled: action,
});
}
@ -122,4 +124,10 @@ export class storeFocusObjects {
this.isEditCell = value;
}
functionsDisable = false;
setFunctionsDisabled(value) {
this.functionsDisable = value;
}
}

View file

@ -87,6 +87,7 @@ const CellEditorView = props => {
const isPhone = Device.isPhone;
const storeAppOptions = props.storeAppOptions;
const storeFunctions = props.storeFunctions;
const {functionsDisable} = props.storeFocusObjects;
const functions = storeFunctions.functions;
const isEdit = storeAppOptions.isEdit;
const funcArr = props.funcArr;
@ -100,7 +101,7 @@ const CellEditorView = props => {
<View id="idx-celleditor" style={viewStyle} routes={routes} className={expanded ? 'cell-editor expanded' : 'cell-editor collapsed'}>
<div id="box-cell-name" className="ce-group">
<span id="idx-cell-name">{props.cellName}</span>
<a href="#" id="idx-btn-function" className='link icon-only' disabled={(!isEdit && true) || props.stateCoauth} onClick={() => {props.onClickToOpenAddOptions('function', '#idx-btn-function');}}>
<a href="#" id="idx-btn-function" className='link icon-only' disabled={(!isEdit && true) || props.stateCoauth || functionsDisable} onClick={() => {props.onClickToOpenAddOptions('function', '#idx-btn-function');}}>
<i className="icon icon-function" />
</a>
</div>
@ -154,4 +155,4 @@ const routes = [
];
export default inject("storeAppOptions", "storeFunctions")(observer(CellEditorView));
export default inject("storeAppOptions", "storeFunctions", "storeFocusObjects")(observer(CellEditorView));