mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-29 10:39:38 +08:00
enhance: not trigger scroll on ActionButton (#51647)
This commit is contained in:
parent
6ee60ed3a1
commit
f3618aaeb3
@ -52,7 +52,9 @@ const ActionButton: React.FC<ActionButtonProps> = (props) => {
|
||||
let timeoutId: ReturnType<typeof setTimeout> | null = null;
|
||||
if (autoFocus) {
|
||||
timeoutId = setTimeout(() => {
|
||||
buttonRef.current?.focus();
|
||||
buttonRef.current?.focus({
|
||||
preventScroll: true,
|
||||
});
|
||||
});
|
||||
}
|
||||
return () => {
|
||||
|
Loading…
Reference in New Issue
Block a user