expandedChange
Fired when the user clicks the header to toggle the expanded state. Calling e.preventDefault() prevents the toggle from taking effect.
The event handler function context (available via the this keyword) will be set to the widget instance.
Event Data
e.expanded Boolean
The new expanded state. true when expanding, false when collapsing.
e.preventDefault Function
If invoked, prevents the content body from being shown or hidden.
e.sender kendo.ui.Reasoning
The widget instance which fired the event.
Example - subscribe to the "expandedChange" event during initialization
<div id="reasoning"></div>
<script>
$("#reasoning").kendoReasoning({
label: "Thinking",
expandable: true,
content: "Evaluating options.",
expandedChange: function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(e.expanded);
}
});
</script>
Example - subscribe to the "expandedChange" event after initialization
<div id="reasoning"></div>
<script>
$("#reasoning").kendoReasoning({
label: "Thinking",
expandable: true,
content: "Evaluating options."
});
var reasoning = $("#reasoning").data("kendoReasoning");
reasoning.bind("expandedChange", function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(e.expanded);
});
</script>