cscan / vue3-excel-editor

Vue3 plugin for displaying and editing the array-of-object in Excel style.
MIT License
231 stars 51 forks source link

Bug: Not creating new row after exceeding (# of rows in a page) + 1 #7

Closed salimtirit closed 1 year ago

salimtirit commented 1 year ago

(newIfBottom is true)

Table stops creating new rows when I click enter after number of rows in a page + 1. If number of rows in a page is 25 after the 26th row it stops creating new rows. When you import an excel it imports without a problem. But the main problem remains. Let say excel table has 56 rows. After 57th row you can not create new row simply by clicking enter or down arrow.

I think the problem is in the moveSouth function (line 2173 in VueExcelEditor.vue). If you change inside of the if statement from this.currentRowPos + 1 >= this.table.length to this.currentRowPos+1 >= this.pageSize && this.pageBottom >= this.table.length it works. Can you please review and change it?

salimtirit commented 1 year ago

Now I realized the one I wrote also does not work properly. When the number of rows are less then the page size it does not add new row. this.currentRowPos+1 >= (this.pageBottom - this.pageTop) && this.pageBottom >= this.table.length this one seems to work.

cscan commented 1 year ago

Thanks, will incorporate it in next patch