Currently in my oracle apex application, I am trying to target changes made within an interactive grid and pass the column name, record ID, and contents of the changed cell to an AJAX callback every time an update is made to the interactive grid.
My idea was to iterate through the array returned by getChanges
but I am having some difficulty. With the following code, called from a change dynamic action with .a-GV-cell
as the jQuery target, the record ID is printed to the console, but only after a second change is made. There seems to be a delay.
var model = apex.region('IG_STATIC_ID').widget().interactiveGrid('getCurrentView').model;
var changes = model.getChanges();
changes.forEach(function(change) {
var recId = model.getRecordId(change.record);
console.log(recId);
});