[DE PE SSE mobile] Fix Bug 52109
This commit is contained in:
parent
2a0ae0db20
commit
88a2406080
|
@ -13,8 +13,8 @@ const PageLink = props => {
|
||||||
const [stateLink, setLink] = useState('');
|
const [stateLink, setLink] = useState('');
|
||||||
const [stateDisplay, setDisplay] = useState(display);
|
const [stateDisplay, setDisplay] = useState(display);
|
||||||
const [stateTip, setTip] = useState('');
|
const [stateTip, setTip] = useState('');
|
||||||
const [stateAutoUpdate, setAutoUpdate] = useState(true);
|
const [stateAutoUpdate, setAutoUpdate] = useState(!stateDisplay ? true : false);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
{!props.noNavbar && <Navbar title={_t.textAddLink} backLink={_t.textBack}></Navbar>}
|
{!props.noNavbar && <Navbar title={_t.textAddLink} backLink={_t.textBack}></Navbar>}
|
||||||
|
@ -26,7 +26,7 @@ const PageLink = props => {
|
||||||
value={stateLink}
|
value={stateLink}
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
setLink(event.target.value);
|
setLink(event.target.value);
|
||||||
if((!stateDisplay || stateDisplay === stateLink) && stateAutoUpdate) setDisplay(event.target.value);
|
if(stateAutoUpdate) setDisplay(event.target.value);
|
||||||
}}
|
}}
|
||||||
></ListInput>
|
></ListInput>
|
||||||
<ListInput
|
<ListInput
|
||||||
|
|
|
@ -99,7 +99,7 @@ const PageLink = props => {
|
||||||
const display = props.getTextDisplay();
|
const display = props.getTextDisplay();
|
||||||
const displayDisabled = display !== false && display === null;
|
const displayDisabled = display !== false && display === null;
|
||||||
const [stateDisplay, setDisplay] = useState(display !== false ? ((display !== null) ? display : _t.textDefault) : "");
|
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('');
|
const [screenTip, setScreenTip] = useState('');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -117,7 +117,7 @@ const PageLink = props => {
|
||||||
value={link}
|
value={link}
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
setLink(event.target.value);
|
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={{
|
<ListItem link={'/add-link-to/'} title={_t.textLinkTo} after={displayTo} routeProps={{
|
||||||
|
|
|
@ -63,7 +63,7 @@ const AddLinkView = props => {
|
||||||
displayText = displayDisabled ? _t.textSelectedRange : displayText;
|
displayText = displayDisabled ? _t.textSelectedRange : displayText;
|
||||||
|
|
||||||
const [stateDisplayText, setDisplayText] = useState(displayText);
|
const [stateDisplayText, setDisplayText] = useState(displayText);
|
||||||
const [stateAutoUpdate, setAutoUpdate] = useState(true);
|
const [stateAutoUpdate, setAutoUpdate] = useState(!stateDisplayText ? true : false);
|
||||||
const [screenTip, setScreenTip] = useState('');
|
const [screenTip, setScreenTip] = useState('');
|
||||||
|
|
||||||
const activeSheet = props.activeSheet;
|
const activeSheet = props.activeSheet;
|
||||||
|
@ -90,7 +90,7 @@ const AddLinkView = props => {
|
||||||
value={link}
|
value={link}
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
setLink(event.target.value);
|
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' : ''}
|
className={isIos ? 'list-input-right' : ''}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue