mnylc / islandora_multi_importer

This is a flexible, twig based, all cmodel, tabular data to islandora Object importer with optional ZeroMQ processing
GNU General Public License v3.0
16 stars 15 forks source link

Fix row index going out of scope on pagination and arbitrary parent/child row order #104

Closed DiegoPino closed 5 years ago

DiegoPino commented 5 years ago

What does this pull do?

See #103

This checks if and old selected row index exists or not when Ajax triggers a reload on data preview pagination, if not, it defaults back to the first element in the new page, allowing everything to flow again. Also. This allows arbitrary parent /child ordering (parent index) in a spreadsheet. Means you can have page Objects in row 1-N and then a book in row N+1. And the first ones referring to that N+1 row as parent. It adds a bit more complexity to my code, but it seems to be working.

How to test?

Select a row for preview, move between pages in the data preview, select another. No AJAX errors or logged errors should be there.

@kllhwang please test. Its online in our dev server.

DiegoPino commented 5 years ago

Got verbal confirmation from @kllhwang (don't be git shy!) of this fix working. Merging to master