Improved querystring import on paste (#110)

This commit is contained in:
Gregory Schier
2024-09-25 08:03:19 -07:00
committed by GitHub
parent de7097ff1d
commit 7d97404c11
5 changed files with 36 additions and 25 deletions

View File

@@ -17,6 +17,7 @@ type Props = Pick<HttpRequest, 'url'> & {
onSend: () => void;
onUrlChange: (url: string) => void;
onPaste?: (v: string) => void;
onPasteOverwrite?: (v: string) => void;
onCancel: () => void;
submitIcon?: IconProps['icon'] | null;
onMethodChange?: (method: string) => void;
@@ -37,6 +38,7 @@ export const UrlBar = memo(function UrlBar({
onCancel,
onMethodChange,
onPaste,
onPasteOverwrite,
submitIcon = 'send_horizontal',
autocomplete,
rightSlot,
@@ -77,6 +79,7 @@ export const UrlBar = memo(function UrlBar({
onFocus={() => setIsFocused(true)}
onBlur={() => setIsFocused(false)}
onPaste={onPaste}
onPasteOverwrite={onPasteOverwrite}
onChange={onUrlChange}
defaultValue={url}
placeholder={placeholder}