Is there any simple way to get the object, used to render given row in CellTable, by index of the row?

I am using AsyncDataProvider, and don't want to remember lists of data objects, returned from the server. Also I am using MultiSelectionModel, so several items could be selected there and I need to track out which one was clicked last.

I know the index of last clicked row, so I need to get the object, corresponding to the row, somehow.

有帮助吗?

解决方案

getVisibleItem? possibly combined with getPageStart if you're using paging and you only know the absolute index.

For your use-case, maybe you could use a customized selection model whose setSelected tracks the last change.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top