[DE PE SSE mobile] Fix Bug 52109

This commit is contained in:
SergeyEzhin 2021-08-23 13:13:47 +03:00
parent 2a0ae0db20
commit 88a2406080
3 changed files with 7 additions and 7 deletions

View file

@ -13,8 +13,8 @@ const PageLink = props => {
const [stateLink, setLink] = useState('');
const [stateDisplay, setDisplay] = useState(display);
const [stateTip, setTip] = useState('');
const [stateAutoUpdate, setAutoUpdate] = useState(true);
const [stateAutoUpdate, setAutoUpdate] = useState(!stateDisplay ? true : false);
return (
<Page>
{!props.noNavbar && <Navbar title={_t.textAddLink} backLink={_t.textBack}></Navbar>}
@ -26,7 +26,7 @@ const PageLink = props => {
value={stateLink}
onChange={(event) => {
setLink(event.target.value);
if((!stateDisplay || stateDisplay === stateLink) && stateAutoUpdate) setDisplay(event.target.value);
if(stateAutoUpdate) setDisplay(event.target.value);
}}
></ListInput>
<ListInput

View file

@ -99,7 +99,7 @@ const PageLink = props => {
const display = props.getTextDisplay();
const displayDisabled = display !== false && display === null;
const [stateDisplay, setDisplay] = useState(display !== false ? ((display !== null) ? display : _t.textDefault) : "");
const [stateAutoUpdate, setAutoUpdate] = useState(true);
const [stateAutoUpdate, setAutoUpdate] = useState(!stateDisplay ? true : false);
const [screenTip, setScreenTip] = useState('');
return (
@ -117,7 +117,7 @@ const PageLink = props => {
value={link}
onChange={(event) => {
setLink(event.target.value);
if((!stateDisplay || stateDisplay === link) && stateAutoUpdate) setDisplay(event.target.value);
if(stateAutoUpdate) setDisplay(event.target.value);
}}
/> :
<ListItem link={'/add-link-to/'} title={_t.textLinkTo} after={displayTo} routeProps={{

View file

@ -63,7 +63,7 @@ const AddLinkView = props => {
displayText = displayDisabled ? _t.textSelectedRange : displayText;
const [stateDisplayText, setDisplayText] = useState(displayText);
const [stateAutoUpdate, setAutoUpdate] = useState(true);
const [stateAutoUpdate, setAutoUpdate] = useState(!stateDisplayText ? true : false);
const [screenTip, setScreenTip] = useState('');
const activeSheet = props.activeSheet;
@ -90,7 +90,7 @@ const AddLinkView = props => {
value={link}
onChange={(event) => {
setLink(event.target.value);
if((!stateDisplayText || stateDisplayText === link) && stateAutoUpdate && !displayDisabled) setDisplayText(event.target.value);
if(stateAutoUpdate && !displayDisabled) setDisplayText(event.target.value);
}}
className={isIos ? 'list-input-right' : ''}
/>