I'm trying to utilise the MultiSelect wrapper inside the Kendo Dialog component. I've been following the demos and reading the documentation and have set up a MultiSelect that gets data from an external source and displays it correctly. I now want to be able to pass the values that the user has selected back to the parent (Dialog) component and I'm not sure how to do so. I've read that there is a dataItems method that would retrieve what I need but I'm not sure how to access this in react, I can't find any examples to help.
Here is my component code:
class ChildQuestions extends React.Component {
constructor(props) {
super(props);
this.dataSource = new kendo.data.DataSource({
data: props.data
})
this.values= props.value
this.placeholder = "Enter a question text..."
}
render() {
return (
<
div
className
=
"row"
>
<
div
className
=
"col-xs-12 col-sm-6 example-col"
>
<
MultiSelect
dataSource={this.dataSource}
placeholder={this.placeholder}
dataTextField={"Text"}
dataValueField={"id"}
value={this.values}
/>
</
div
>
</
div
>
);
}
}
export default ChildQuestions;
If you could provide some example code or any guidance that would be greatly appreciated!