diff --git a/packages/terra-compact-interactive-list/CHANGELOG.md b/packages/terra-compact-interactive-list/CHANGELOG.md index 3779d71a356..2a015146f65 100644 --- a/packages/terra-compact-interactive-list/CHANGELOG.md +++ b/packages/terra-compact-interactive-list/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +* Changed + * Changed to avoid focus being set to the first cell on multiple re-renders. + ## 1.15.0 - (April 4, 2024) * Changed @@ -122,4 +125,4 @@ ## 1.0.0-alpha.1 - (November 22, 2023) -* Initial package release. \ No newline at end of file +* Initial package release. diff --git a/packages/terra-compact-interactive-list/src/CompactInteractiveList.jsx b/packages/terra-compact-interactive-list/src/CompactInteractiveList.jsx index 1411be041e0..cfcdfff96a1 100644 --- a/packages/terra-compact-interactive-list/src/CompactInteractiveList.jsx +++ b/packages/terra-compact-interactive-list/src/CompactInteractiveList.jsx @@ -159,7 +159,8 @@ const CompactInteractiveList = (props) => { if (listRef?.current && focusedCell?.current) { focusedCell.current = getFocusedCellIds(listRef?.current, columns, { row: 0, cell: 0 }); } - }, [listRef, focusedCell, columns]); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); const focusCell = ({ row, cell }) => { // add 1 to the row number to accommodate for hidden header