Skip to content

Commit 4c99296

Browse files
author
Kenneth Cheng
committed
fix moveSouth bug if new-if-bottom
1 parent f429734 commit 4c99296

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vue3-excel-editor",
33
"email": "apple.6502@gmail.com",
44
"description": "Vue3 plugin for displaying and editing the array-of-object in Excel style",
5-
"version": "1.0.12",
5+
"version": "1.0.13",
66
"main": "src/main.js",
77
"dependencies": {
88
"@vuepic/vue-datepicker": "^3.3.0",

src/VueExcelEditor.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,8 @@ export default {
10431043
if (!count) return
10441044
10451045
const fullWidth = this.editor.getBoundingClientRect().width
1046-
const viewWidth = this.fields.filter(f => !f.invisible).reduce((c, f) => c - -f.width.replace(/px$/, ''), 0) + 40
1046+
const viewWidth = this.fields.filter(f => !f.invisible).reduce((c, f) => c - -f.width.replace(/px$/, ''), 0)
1047+
+ (this.noNumCol ? 0 : 40)
10471048
const fillWidth = viewWidth - fullWidth + 2
10481049
if (fillWidth)
10491050
doFields.forEach(f => f.minWidth = (f.width.replace(/px$/, '') - fillWidth / count) + 'px')
@@ -2186,7 +2187,8 @@ export default {
21862187
},
21872188
moveSouth () {
21882189
if (this.focused) {
2189-
if (this.currentRowPos + 1 >= this.table.length) {
2190+
// if (this.currentRowPos + 1 >= this.table.length) {
2191+
if (this.currentRowPos+1 >= (this.pageBottom - this.pageTop) && this.pageBottom >= this.table.length) {
21902192
if (this.readonly) return false
21912193
if (!this.newIfBottom) return false
21922194
this.newRecord({}, false, true)

0 commit comments

Comments
 (0)