[DE PE SSE mobile] Fix Bug 52109
This commit is contained in:
parent
2a0ae0db20
commit
88a2406080
|
@ -13,7 +13,7 @@ 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>
|
||||
|
@ -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
|
||||
|
|
|
@ -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={{
|
||||
|
|
|
@ -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' : ''}
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue