But now I have another issue with Grid.
In your example at https://www.telerik.com/kendo-react-ui/components/grid/advanced-features/detail/
The detail={DetailComponent} expandField="expanded" onExpandChange={this.expandChange} refers to :
expandChange = (event) => { event.dataItem.expanded = !event.dataItem.expanded;this.forceUpdate();} in the class
I am not using classes at all because I am using hooks.
I tried :
const useForceUpdate = () => React.useState()[1];
const forceUpdate = useForceUpdate();
const expandChange = (event) => {
event.dataItem.expanded = !event.dataItem.expanded;
forceUpdate; // this.forceUpdate();
};
there is no error but I do not see the {DetailComponent}
const DetailComponent = (props) => {
return (
<section>
<p><strong>In Stock:</strong> units</p>
<p><strong>On Order:</strong> units</p>
<p><strong>Reorder Level:</strong> units</p>
<p><strong>Discontinued:</strong> </p>
<p><strong>Category:</strong> Hello</p>
</section>
);
};
Can you point me to a hook example for that?