mirror of
https://github.com/usebruno/bruno.git
synced 2025-02-16 09:50:17 +01:00
fix: cursor jump to start (#3082)
Co-authored-by: maxdiplogit <maxdiplo@Harshmeets-MacBook-Air.local>
This commit is contained in:
parent
81d8c30d84
commit
9614ab069f
@ -25,7 +25,12 @@ const QueryUrl = ({ item, collection, handleRun }) => {
|
|||||||
setMethodSelectorWidth(el.offsetWidth);
|
setMethodSelectorWidth(el.offsetWidth);
|
||||||
}, [method]);
|
}, [method]);
|
||||||
|
|
||||||
const onSave = () => {
|
const onSave = (finalValue) => {
|
||||||
|
dispatch(requestUrlChanged({
|
||||||
|
itemUid: item.uid,
|
||||||
|
collectionUid: collection.uid,
|
||||||
|
url: finalValue && typeof finalValue === 'string' ? finalValue.trim() : value
|
||||||
|
}));
|
||||||
dispatch(saveRequest(item.uid, collection.uid));
|
dispatch(saveRequest(item.uid, collection.uid));
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -34,7 +39,7 @@ const QueryUrl = ({ item, collection, handleRun }) => {
|
|||||||
requestUrlChanged({
|
requestUrlChanged({
|
||||||
itemUid: item.uid,
|
itemUid: item.uid,
|
||||||
collectionUid: collection.uid,
|
collectionUid: collection.uid,
|
||||||
url: value && typeof value === 'string' ? value.trim() : value
|
url: (value && typeof value === 'string') && value
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -64,7 +69,7 @@ const QueryUrl = ({ item, collection, handleRun }) => {
|
|||||||
>
|
>
|
||||||
<SingleLineEditor
|
<SingleLineEditor
|
||||||
value={url}
|
value={url}
|
||||||
onSave={onSave}
|
onSave={(finalValue) => onSave(finalValue)}
|
||||||
theme={storedTheme}
|
theme={storedTheme}
|
||||||
onChange={(newValue) => onUrlChange(newValue)}
|
onChange={(newValue) => onUrlChange(newValue)}
|
||||||
onRun={handleRun}
|
onRun={handleRun}
|
||||||
|
Loading…
Reference in New Issue
Block a user