Scroll to row on grid ready

This commit is contained in:
jeffvli
2022-11-19 20:50:12 -08:00
parent 5811069a0a
commit 4f3bd8f44a
@@ -77,12 +77,10 @@ export const PlayQueue = ({ type }: QueueProps) => {
}; };
const handleGridReady = () => { const handleGridReady = () => {
if (tableConfig.followCurrentSong) {
const { api } = gridRef?.current; const { api } = gridRef?.current;
const currentNode = api.getRowNode(current?.uniqueId); const currentNode = api.getRowNode(current?.uniqueId);
api.ensureNodeVisible(currentNode, 'middle'); api.ensureNodeVisible(currentNode, 'middle');
}
}; };
const handleColumnChange = () => { const handleColumnChange = () => {