[SSE mobile] Fix Bug 52077

This commit is contained in:
SergeyEzhin 2021-08-19 21:12:31 +03:00
parent d9622b84eb
commit bd326bcdfa
3 changed files with 8 additions and 3 deletions

View file

@ -334,7 +334,8 @@
"txtExpandSort": "The data next to the selection will not be sorted. Do you want to expand the selection to include the adjacent data or continue with sorting the currently selected cells only?",
"txtNotUrl": "This field should be a URL in the format \"http://www.example.com\"",
"txtSorting": "Sorting",
"txtSortSelected": "Sort selected"
"txtSortSelected": "Sort selected",
"textSelectedRange": "Selected Range"
},
"Edit": {
"notcriticalErrorTitle": "Warning",

View file

@ -87,7 +87,10 @@ class AddLinkController extends Component {
display = args.sheet + '!' + args.url;
}
if(this.displayText !== 'locked') {
link.asc_setText(args.text == null ? null : !!args.text ? args.text : display);
}
link.asc_setTooltip(args.tooltip);
api.asc_insertHyperlink(link);

View file

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