beforeHide
fires before a control or its toggle is hidden
beforeHide: (value: {[id: string]: boolean | string | number}, id?: string, init?: boolean) => boolean | void;
Parameters:
value: object- the current value of the control. The object contains a set of key:value pairs where the key is the id of a toggle and the value is the value/state of the toggle.id?: string- optional, the ID of a toggle of the controlinit?: boolean- optional, true, if the event is triggered on the control initialization; otherwise, false
Returns:
Return false to prevent a control or its toggle from being hidden; otherwise, true.
Example
form.getItem("ToggleGroup").events.on("beforeHide", function(value, id, init) {
    console.log("beforeHide", value, id, init);
    return true;
});