|
|
@ -107,6 +107,19 @@ const { selectCell, selectBlock, selectedRange, clearRangeRows, startSelectRange |
|
|
|
isPkAvail, |
|
|
|
isPkAvail, |
|
|
|
clearCell, |
|
|
|
clearCell, |
|
|
|
makeEditable, |
|
|
|
makeEditable, |
|
|
|
|
|
|
|
() => { |
|
|
|
|
|
|
|
if (selected.row !== null && selected.col !== null) { |
|
|
|
|
|
|
|
// get active cell |
|
|
|
|
|
|
|
const td = tbodyEl.value?.querySelectorAll('tr')[selected.row]?.querySelectorAll('td')[selected.col + 1] |
|
|
|
|
|
|
|
if (!td) return |
|
|
|
|
|
|
|
// scroll into the active cell |
|
|
|
|
|
|
|
td.scrollIntoView({ |
|
|
|
|
|
|
|
behavior: 'smooth', |
|
|
|
|
|
|
|
block: 'end', |
|
|
|
|
|
|
|
inline: 'end', |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
onMounted(loadGridViewColumns) |
|
|
|
onMounted(loadGridViewColumns) |
|
|
@ -353,19 +366,19 @@ watch( |
|
|
|
|
|
|
|
|
|
|
|
const tbodyEl = ref<HTMLElement>() |
|
|
|
const tbodyEl = ref<HTMLElement>() |
|
|
|
|
|
|
|
|
|
|
|
watch([() => selected.row, () => selected.col], ([row, col]) => { |
|
|
|
// watch([() => selected.row, () => selected.col], ([row, col]) => { |
|
|
|
if (row !== null && col !== null) { |
|
|
|
// if (row !== null && col !== null) { |
|
|
|
// get active cell |
|
|
|
// // get active cell |
|
|
|
const td = tbodyEl.value?.querySelectorAll('tr')[row]?.querySelectorAll('td')[col + 1] |
|
|
|
// const td = tbodyEl.value?.querySelectorAll('tr')[row]?.querySelectorAll('td')[col + 1] |
|
|
|
if (!td) return |
|
|
|
// if (!td) return |
|
|
|
// scroll into the active cell |
|
|
|
// // scroll into the active cell |
|
|
|
td.scrollIntoView({ |
|
|
|
// td.scrollIntoView({ |
|
|
|
behavior: 'smooth', |
|
|
|
// behavior: 'smooth', |
|
|
|
block: 'end', |
|
|
|
// block: 'end', |
|
|
|
inline: 'end', |
|
|
|
// inline: 'end', |
|
|
|
}) |
|
|
|
// }) |
|
|
|
} |
|
|
|
// } |
|
|
|
}) |
|
|
|
// }) |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|