Hi Ed,
Thanks for contacting Syncfusion support.
The getSelectedItems returns below three parameters of selected items.
- data array
- HTML element array
- text array.
Refer to the below code snippet for how to get the reference of ListView Component and how to get the selected items using getSelectedItems method by using the reference.
|
render() {
return (
<div>
{/* ListView component is rendered in DOM and taking reference of ListView Component as listobj. */}
<ListViewComponent id='list' dataSource={this.data} showCheckBox={true} ref={(list) => { this.listobj = list; }} ></ListViewComponent>
. . .
. . .
</div>
);
}
. . .
. . .
let selecteditem = this.listobj.getSelectedItems(); // It returns the selected item data from list items
|
For your convenience we have prepared a sample and attached below. Refer to the below sample link.
We suggest you to refer our below demo link and getting started links to explore more about our ListView Component.
Resources:
We also recommend you to refer our Syncfusion Succinctly free
e-book to learn ReactJS.
Please let us know if you need further assistance on this.
Thanks,
Subha Shree D.R