UNPKG

hswidget

Version:
28 lines (27 loc) 805 B
import m from "mithril"; import { Widget } from "./Widget"; import { WidgetAttrs } from "./Widget"; import { Vnode } from "./Widget"; interface IsTest { (val: ListRow): boolean; } export interface RowRender { (row: ListRow, rowNum: number): m.Children; } export declare type ListRow = any | any[]; export interface EditListAttrs extends WidgetAttrs { rows?: any[]; sort?: (a: any, b: any) => number; isEmpty?: (row: ListRow) => boolean; collapsible?: boolean; rowRender?: RowRender; isExpanded?: boolean; defaultRow?: ListRow; expand?: (rows: any[], def: any, isEmpty: IsTest) => void; columnTemplate?: string; header?: m.Children; } export declare class EditList extends Widget { view(node: Vnode<EditListAttrs, this>): m.Vnode<any, any>; } export {};