"visible" Items in a container?

Am I correct in assuming that, in a Container, an Item being “visible” only means it is not filtered out?

If so, how can I find which Items are literally visible to the user in the UI? I need this to optimize some Table calculations. I would like to restrict the calculating only to those rows the user can actually see.

Hi,


Table.getVisibleItemIds(): “Returns item identifiers of the items which are currently rendered on the client.”

This is most likely what you are looking for. Note that table pre-renders rows outside the area that’s actually visible, BUT if the user scrolls those rows will become visible w/o an additional server visit, hence you’ll probably want to calculate for these rows also.
You can adjust this behavior by adjusting
cacheRate
; if you
setCacheRate(0)
pre-rendering is turned off, and only
pageLength
rows are actually rendered (IIRC). This might be a viable option in your case, if you’re doing heavy calculations (scrolling a short distance will appear slightly slower, though).

Best Regards,
Marc

Thanks