Browse Source

Merge pull request #5011 from nocodb/fix/5006-allow-new-row-shortcut

fix(gui): on new row creation using shortcut set the first cell as active
pull/5015/head
Raju Udava 2 years ago committed by GitHub
parent
commit
e04359601a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      packages/nc-gui/components/smartsheet/Grid.vue

9
packages/nc-gui/components/smartsheet/Grid.vue

@ -283,13 +283,10 @@ const {
activeCell.row = data.value.length - 1 activeCell.row = data.value.length - 1
activeCell.col = 0 activeCell.col = 0
resetSelectedRange() resetSelectedRange()
makeEditable(data.value[activeCell.row], fields.value[activeCell.col])
nextTick(() => { nextTick(() => {
;( ;(document.querySelector('td.cell.active') as HTMLInputElement | HTMLTextAreaElement)?.scrollIntoView({
document.querySelector('td.cell.active')?.querySelector('input,textarea') as behavior: 'smooth',
| HTMLInputElement })
| HTMLTextAreaElement
)?.focus()
}) })
} }
break break

Loading…
Cancel
Save