Atmos206 / ui-grid-custom-cell-select

UI Grid 3.x/4.x Custom Copy/Paste Selection Plugin
8 stars 5 forks source link

Paste Functionality Ignoring the Last Row #4

Open tornadicshark opened 6 years ago

tornadicshark commented 6 years ago

When trying to paste a single row, functionality does not work.

When trying to paste multiple rows, the functionality pastes all rows except the last row.

Copying first 2 rows - https://imgur.com/a/Ec9cN Result of pasting 2 rows to the rows below - https://imgur.com/xWh7fjU

The rows do output correctly when pasting into Excel. The issues with pasting include from Excel to the App and from the same table within an App.

Edit: Setup is Chrome Browser, Angular UI Grid 3.x, Angular 1.6.x, Jquery (recent npm install), and MacOS.

Ceteareth commented 5 years ago

Been a while since you posted this, so I presume you figured it out, but it's caused by this on line 140: for (var k = 0; k < pastedRows.length - 1; k++)

Just remove the -1 and you should be good.