Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/variant-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

const VariantItem = ({title, shortName, url, active}) => {
return (
<ActionList.Item state={{scrollUpdate: false}} id={shortName} active={active}>
<ActionList.Item state={{scrollUpdate: false}} id={shortName} active={active} tabIndex={null}>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is often more reliable for preventing React components from adding unwanted tabindex attributes.

<LinkNoUnderline to={url}>{title}</LinkNoUnderline>
</ActionList.Item>
)
Expand Down Expand Up @@ -45,7 +45,7 @@
if (locationChange.change && getNav.didVariantChange(locationChange.previous, locationChange.current)) {
setOpen(false)
}
}, [locationChange.change, locationChange.current, locationChange.previous])

Check warning on line 48 in src/components/variant-select.js

View workflow job for this annotation

GitHub Actions / Lint

React Hook React.useEffect has a missing dependency: 'locationChange'. Either include it or remove the dependency array. Mutable values like 'locationChange.current' aren't valid dependencies because mutating them doesn't re-render the component

return (
<>
Expand Down