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 step body from being shown or hidden.
e.sender kendo.ui.ChainOfThought
The widget instance which fired the event.
Example - subscribe to the "expandedChange" event during initialization
<div id="chain"></div>
<script>
$("#chain").kendoChainOfThought({
label: "Thinking",
expandable: true,
thoughts: [{ label: "Step 1" }],
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="chain"></div>
<script>
$("#chain").kendoChainOfThought({
label: "Thinking",
expandable: true,
thoughts: [{ label: "Step 1" }]
});
var chain = $("#chain").data("kendoChainOfThought");
chain.bind("expandedChange", function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(e.expanded);
});
</script>