Table method getRows() returns only visible Rows
See original GitHub issueIn 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:
- Open the JSBin example
- Click the button and look into the console
- 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
Issue Analytics
- State:
- Created 8 years ago
- Comments:15 (4 by maintainers)
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.
The second line is to initialize, because
attachChange
is only called on a change.