Skip to content

Commit

Permalink
fix moveSouth bug if new-if-bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Cheng committed Aug 23, 2022
1 parent f429734 commit 4c99296
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vue3-excel-editor",
"email": "[email protected]",
"description": "Vue3 plugin for displaying and editing the array-of-object in Excel style",
"version": "1.0.12",
"version": "1.0.13",
"main": "src/main.js",
"dependencies": {
"@vuepic/vue-datepicker": "^3.3.0",
Expand Down
6 changes: 4 additions & 2 deletions src/VueExcelEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,8 @@ export default {
if (!count) return
const fullWidth = this.editor.getBoundingClientRect().width
const viewWidth = this.fields.filter(f => !f.invisible).reduce((c, f) => c - -f.width.replace(/px$/, ''), 0) + 40
const viewWidth = this.fields.filter(f => !f.invisible).reduce((c, f) => c - -f.width.replace(/px$/, ''), 0)
+ (this.noNumCol ? 0 : 40)
const fillWidth = viewWidth - fullWidth + 2
if (fillWidth)
doFields.forEach(f => f.minWidth = (f.width.replace(/px$/, '') - fillWidth / count) + 'px')
Expand Down Expand Up @@ -2186,7 +2187,8 @@ export default {
},
moveSouth () {
if (this.focused) {
if (this.currentRowPos + 1 >= this.table.length) {
// if (this.currentRowPos + 1 >= this.table.length) {
if (this.currentRowPos+1 >= (this.pageBottom - this.pageTop) && this.pageBottom >= this.table.length) {
if (this.readonly) return false
if (!this.newIfBottom) return false
this.newRecord({}, false, true)
Expand Down

0 comments on commit 4c99296

Please sign in to comment.