Open Hearen opened 6 years ago
window.document.getElementsByClassName('ant-table-tbody')[0].getElementsByClassName('ant-table-row-level-0')[0].scrollIntoView('smooth');//scroll to the first row (adding new row when in the middle of the table);
scrollIntoView doc; https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
and run the online test:
https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_element_scrollintoview
window.document.getElementsByClassName('ant-table-tbody')[0].getElementsByClassName('ant-table-row-level-0')[0].scrollIntoView('smooth');//scroll to the first row (adding new row when in the middle of the table);