--- title: handleTreeViewCheckChange description: "Learn how to build custom functionality when working with the React TreeView by Kendo UI with the help of the handleTreeViewCheckChange." api_reference: true type: inner_api slug: api_treeview_handletreeviewcheckchange --- # handleTreeViewCheckChange A helper function which updates the check descriptor. ```jsx const App = () => { const [check, setCheck] = React.useState([]); const [items] = React.useState(tree); const onCheckChange = (event) => { setCheck(handleTreeViewCheckChange(event, check, items)); } return (
[TreeViewExpandChangeEvent]({% slug api_treeview_treeviewexpandchangeevent %})
The event that triggered the change.
##### check
string[] | [TreeViewCheckDescriptor]({% slug api_treeview_treeviewcheckdescriptor %})
The check descriptor that will be updated.
##### data?
"null" | any[]
The TreeView items.
##### settings
[TreeViewCheckChangeSettings]({% slug api_treeview_treeviewcheckchangesettings %})
The additional settings that configure the update of the check descriptor.
##### childrenField?
string
The field that points to the dataItem sub items. Defaults to `items`.
The default behavior allows the selection of multiple items.
#### Returns
any[] | [TreeViewCheckDescriptor]({% slug api_treeview_treeviewcheckdescriptor %}) [intersected](https://www.typescriptlang.org/docs/handbook/advanced-types.html#intersection-types) with { ids: any[]; }
- The updated copy of the input check descriptor.