Skip to content

Commit

Permalink
replace faulty [-1] notation
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAlmightyCrumb committed Dec 8, 2024
1 parent 7e20c88 commit 456704a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/components/src/list/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function List<T, EL extends HTMLElement = HTMLDivElement>({
const [focusedId, setFocusedId] = useStateControls(focusControl, undefined);
const [prevSelectedId, setPrevSelectedId] = useState(selectedIds);
if (selectedIds !== prevSelectedId) {
setFocusedId(selectedIds[-1]);
setFocusedId(selectedIds[selectedIds.length - 1]);
setPrevSelectedId(selectedIds);
}
const defaultRef = useRef<EL>();
Expand Down

0 comments on commit 456704a

Please sign in to comment.