openui5: Table method getRows() returns only visible Rows

In my use case I wanted to get the selected indices and the related rows. So I used the methods getSelectedIndices() and getRows(). But to my utter surprise I only get the actual visible rows, but the indices are the “real” indices (so when scrolled down they start fortunately NOT with 0).

In my opinion this is a bug, because working with indices and the rows becomes useless. Also the method should be called “getVisibleRows()” or something similar to make it clear.

Actual I use “the workaround” that I use the indices with my related model.

OpenUI5 version: 1.24.2

Browser/version (+device/version): Google Chrome 41.0.2272.118 (64-bit)

Any other tested browsers/devices(OK/FAIL): Firefox 37.0.1

Steps to reproduce the problem:

  1. Open the JSBin example
  2. Click the button and look into the console
  3. Scroll the table down, click the button and look into the console again http://jsbin.com/pujokiyusa/1/edit?html,console,output

What is the expected result? getRows() should return ALL rows

What happens instead? It returns only the displayed rows

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 18 (3 by maintainers)

Most upvoted comments

Hi,

Can you please update the openui5 documentation https://openui5.hana.ondemand.com/#docs/api/symbols/sap.ui.table.Table.html#getRows ? I lost time to understand why I only get visible rows with the getRows() method… until I found this post.

Thank you guys.