mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
Scroll to row on grid ready
This commit is contained in:
@@ -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 = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user