fix: prevent scroll on token select focus (#3560)
This commit is contained in:
parent
3626dbdeec
commit
46e6c2295d
@ -68,7 +68,7 @@ export function TokenSelectDialog({ value, onSelect }: TokenSelectDialogProps) {
|
|||||||
const baseTokens: Currency[] = [] // TODO(zzmp): Add base tokens to token list functionality
|
const baseTokens: Currency[] = [] // TODO(zzmp): Add base tokens to token list functionality
|
||||||
|
|
||||||
const input = useRef<HTMLInputElement>(null)
|
const input = useRef<HTMLInputElement>(null)
|
||||||
useEffect(() => input.current?.focus(), [input])
|
useEffect(() => input.current?.focus({ preventScroll: true }), [input])
|
||||||
|
|
||||||
const [options, setOptions] = useState<ElementRef<typeof TokenOptions> | null>(null)
|
const [options, setOptions] = useState<ElementRef<typeof TokenOptions> | null>(null)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user