Skip to content

Commit

Permalink
Fixed focus in ref when go to collection
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivanruii committed Apr 19, 2024
1 parent 80f48f5 commit bb0b512
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ export const TableRelationElementDestination: React.FC<Props> = props => {

const scrollToTablePosition = () => {
if (destinationTableRef.current) {
destinationTableRef.current.scrollIntoView({
behavior: 'smooth',
block: 'center',
});
destinationTableRef.current.tabIndex = 0;
destinationTableRef.current.focus();
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ export const TableRelationElementOrigin: React.FC<Props> = props => {

const scrollToTablePosition = () => {
if (originTableRef.current) {
originTableRef.current.scrollIntoView({
behavior: 'smooth',
block: 'center',
});
originTableRef.current.tabIndex = 0;
originTableRef.current.focus();
}
};

Expand Down

0 comments on commit bb0b512

Please sign in to comment.