I am trying to set selected records in apex Interactive Grid following documentation
https://docs.oracle.com/en/database/oracle/application-express/19.1/aexjs/interactiveGrid.html#setSelectedRecords but it does not work.
I have an array of records and when I am trying to set selected records using
apex.region("grid").widget().interactiveGrid("setSelectedRecords", records);
or
grid.setSelectedRecords(records);
when I check it via console the output is like below but the rows are not selected (selection is empty as I would pass the empty array.

In the documentation I have found that alternatively, I could use RecordId array but I am not sure how to get it in my report.
I am using APEX 19.2, anyone faced a similar issue? Any suggestions?