Skip to content

Commit e0ea583

Browse files
committed
Revert "fix: remove tabindex from VariantItem after component renders"
This reverts commit 2447450.
1 parent 101d84a commit e0ea583

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/components/variant-select.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,8 @@ const StyledOverlay = styled(ActionMenu.Overlay)`
1515
`
1616

1717
const VariantItem = ({title, shortName, url, active}) => {
18-
const itemRef = React.useRef(null)
19-
20-
React.useEffect(() => {
21-
// Remove tabindex after the component renders
22-
if (itemRef.current) {
23-
const actionListItem = itemRef.current.closest('[role="listitem"]') || itemRef.current
24-
if (actionListItem) {
25-
actionListItem.removeAttribute('tabindex')
26-
actionListItem.removeAttribute('tabIndex')
27-
}
28-
}
29-
}, [])
30-
3118
return (
32-
<ActionList.Item ref={itemRef} state={{scrollUpdate: false}} id={shortName} active={active}>
19+
<ActionList.Item state={{scrollUpdate: false}} id={shortName} active={active}>
3320
<LinkNoUnderline to={url}>{title}</LinkNoUnderline>
3421
</ActionList.Item>
3522
)

0 commit comments

Comments
 (0)