diff --git a/apps/spreadsheeteditor/mobile/src/controller/edit/EditCell.jsx b/apps/spreadsheeteditor/mobile/src/controller/edit/EditCell.jsx index aa495a97a6..3ea369759f 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/edit/EditCell.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/edit/EditCell.jsx @@ -56,15 +56,12 @@ class EditCellController extends Component { const api = Common.EditorApi.get(); const format = api.asc_convertNumFormatLocal2NumFormat(value); const storeCellSettings = this.props.storeCellSettings; - // const isPhone = Device.phone; storeCellSettings.addCustomFormat({ value: api.asc_convertNumFormat2NumFormatLocal(format), format }); api.asc_setCellFormat(format); - - f7.views.current.router.back(); } toggleBold(value) { diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/EditCell.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/EditCell.jsx index 742cf42779..9b7bbd2abb 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/EditCell.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/EditCell.jsx @@ -936,7 +936,6 @@ const PageCustomFormats = props => { const storeCellSettings = props.storeCellSettings; const customFormats = storeCellSettings.customFormats; const [renderList, setRenderList] = useState(false); - // const isPhone = Device.phone; useEffect(() => { if (customFormats?.length) { @@ -946,7 +945,7 @@ const PageCustomFormats = props => { const handleCellFormatClick = (format) => { props.onCellFormat(format); - f7.views.current.router.back(); + props.f7router.back(); }; return ( @@ -988,11 +987,16 @@ const PageCreationCustomFormat = observer(props => { const [formatValue, setFormatValue] = useState(''); const isIos = Device.ios; + const handleSetCustomFormat = (value) => { + props.setCustomFormat(value); + props.f7router.back(); + } + return ( - props.setCustomFormat(formatValue)}> + handleSetCustomFormat(formatValue)}> <>