Skip to content

Commit

Permalink
Add refocus behaviour with useEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Moore committed Nov 28, 2024
1 parent 3df7c5d commit cd9efe2
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,7 @@ export const GenericTile = ({
<IconButton
label={infoButtonLabel || `${translatedInfoLabel} ${title}`}
icon={<Icon name="info" isPresentational isFilled />}
onClick={(): void => {
setIsFlipped(true)
useEffect(() => {
tileRef.current!.focus()
}, [])
}}
onClick={(): void => setIsFlipped(true)}
disabled={isFlipped}
aria-hidden={isFlipped}
ref={infoButtonRef}
Expand Down

0 comments on commit cd9efe2

Please sign in to comment.