From 4f3bd8f44af3ada4b7be6966b885729b69ede08d Mon Sep 17 00:00:00 2001 From: jeffvli Date: Sat, 19 Nov 2022 20:50:12 -0800 Subject: [PATCH] Scroll to row on grid ready --- .../features/now-playing/components/play-queue.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/renderer/features/now-playing/components/play-queue.tsx b/src/renderer/features/now-playing/components/play-queue.tsx index b7024ee46..ff5a8f8a9 100644 --- a/src/renderer/features/now-playing/components/play-queue.tsx +++ b/src/renderer/features/now-playing/components/play-queue.tsx @@ -77,12 +77,10 @@ export const PlayQueue = ({ type }: QueueProps) => { }; const handleGridReady = () => { - if (tableConfig.followCurrentSong) { - const { api } = gridRef?.current; + const { api } = gridRef?.current; - const currentNode = api.getRowNode(current?.uniqueId); - api.ensureNodeVisible(currentNode, 'middle'); - } + const currentNode = api.getRowNode(current?.uniqueId); + api.ensureNodeVisible(currentNode, 'middle'); }; const handleColumnChange = () => {