[SSE mobile] Correct closing settings

This commit is contained in:
SergeyEzhin
2023-04-18 15:00:13 +04:00
parent a06e6f239a
commit 80b920c813
2 changed files with 7 additions and 6 deletions

View File

@ -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) {

View File

@ -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 (
<Page>
<Navbar title={t('View.Edit.textCreateFormat')} backLink={_t.textBack}>
<NavRight>
<Link text={isIos ? t('View.Edit.textSave') : ''} icon={!isIos ? 'icon-check' : null} className={!formatValue && 'disabled'} onClick={() => props.setCustomFormat(formatValue)}></Link>
<Link text={isIos ? t('View.Edit.textSave') : ''} icon={!isIos ? 'icon-check' : null} className={!formatValue && 'disabled'} onClick={() => handleSetCustomFormat(formatValue)}></Link>
</NavRight>
</Navbar>
<>