grid selectedRow with filter using grid javascript object

I am using the grid object in javascript (with polymer). When the user selects a row, I am able to get the index of the row and the row contents (using this index on the underlying unfiltered data).
However upon filtering the grid, the index is the index of the visible rows. This index does not correspond to the index on the underlying unfiltered data, so I am not able to get the proper row contents.

I need to be able to do something like grid.getSelectedRow() from the grid dom object using javascript.

Thx - Vasan

Resolved the issue as follows:

  1. Store the filtered rows (or visible rows) in a different array and use the selected row index to index into this array.