I'm using a Lightning Aura component and lightning:listView. I wanna get the selected record from lightning:listView when I select the record like below img.

Successfully I get the selected record Id by using formula hyperlink, but it occurs page reload, and I don't wanna reload the page. And it should be clicked two times(double clicks).. so I wanna know how to choose a record by only one click.

Anyone knows how to get the selected record when select in lightning:listView?

List view Image

1 Answer 1


Try This :

var tablecomp = component.find('WrapperTable');
selectedRows = tablecomp.getSelectedRows();

Where WrapperTable is auraid of your Lightning List View

  • Thank you for your answer. I wanna try it. But, how to call Javascript method from component? Like which event should be used?
    – Shinya
    Nov 7, 2019 at 1:24
  • For that, I guess you'll need a button in your component to perform whatever action you need. The Button Click can be the event in that case. Nov 7, 2019 at 6:23
  • I wasn't able to get getSelectedRows() to work at all. @AjinkyaPhadnis, can you provide the link to documentation where you found that? Jan 22, 2020 at 19:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .