Make scrollIntoView center on the "Add channels" button.

This commit is contained in:
Gan Eng Chin 2023-03-20 17:46:54 +08:00
parent 29299903c3
commit 7dd7994e01
No known key found for this signature in database
GPG Key ID: 94D5D972860ADB01
1 changed files with 3 additions and 1 deletions

View File

@ -66,7 +66,9 @@ export const Channels = forwardRef< ChannelsRef, ChannelsProps >(
scrollIntoAddChannels: () => {
setExpanded( true );
addChannelsButtonRef.current?.focus();
addChannelsButtonRef.current?.scrollIntoView();
addChannelsButtonRef.current?.scrollIntoView( {
block: 'center',
} );
},
} ),
[]