feat: auto-scroll to bottom when adding a new row in DataGrid

This commit is contained in:
t8y2
2026-04-29 20:49:13 +08:00
parent b976d5c06d
commit d26173e0eb
3 changed files with 7 additions and 0 deletions
+4
View File
@@ -315,6 +315,10 @@ function onEditKeydown(e: KeyboardEvent) {
function addRow() {
newRows.value.push(props.result.columns.map(() => null));
nextTick(() => {
const el = getScrollerElement();
if (el) el.scrollTop = el.scrollHeight;
});
}
function deleteSelectedRow() {