So all the examples given are for jQuery and show to use the id assigned to the select and use dataItems() to get the selected items in an array. However, for React, I haven't had luck defining a MultiSelect with an id, and I am unsure how to select a specific one to get the selected items. I have several multiselects defined and need to get the selected items that are provided via a remote data source.
Here is an example of one them:
<MultiSelect id=
"materials"
dataSource = {
this
.materialOptions} dataTextField={
'material_code'
} dataValueField={
'material_code'
} placeholder=
'Select Materials...'
/>
When I view the element it doesn't have the assigned id "materials". So how I can access this outside of the render definition?