Page MenuHomeSealhub

collapsible-checkbox-group.ts
No OneTemporary

collapsible-checkbox-group.ts

import { FlatTemplatable } from "tempstream";
import { CheckboxWithValue } from "./checkbox.js";
import { CheckboxGroup, DefaultCheckboxOptions } from "./checkbox-group.js";
import { CollapsibleFieldGroup } from "./collapsible-field-group.js";
import { FormControlContext } from "./form-control.js";
export class CollapsibleCheckboxGroup extends CheckboxGroup<
DefaultCheckboxOptions & {
textWhenOpen?: string;
textWhenClosed?: string;
groupID?: string;
}
> {
wrapGroup(
fctx: FormControlContext,
checkboxes: CheckboxWithValue[]
): Promise<FlatTemplatable> {
return new CollapsibleFieldGroup(checkboxes, {
label: this.options.label,
textWhenOpen: this.options.textWhenOpen,
textWhenClosed: this.options.textWhenClosed,
groupID: this.options.groupID,
}).render(fctx);
}
}

File Metadata

Mime Type
text/x-java
Expires
Fri, Jan 24, 16:50 (7 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
601642
Default Alt Text
collapsible-checkbox-group.ts (803 B)

Event Timeline