preline
Version:
Preline UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework.
26 lines (21 loc) • 547 B
text/typescript
export type ITreeViewOptionsControlBy = 'checkbox' | 'button';
export interface ITreeViewItem {
id: string;
value: string;
isDir: boolean;
path: string;
isSelected?: boolean;
}
export interface ITreeViewOptions {
items: ITreeViewItem[] | null;
controlBy?: ITreeViewOptionsControlBy;
autoSelectChildren?: boolean;
isIndeterminate?: boolean;
}
export interface ITreeView {
options?: ITreeViewOptions;
update(): void;
getSelectedItems(): ITreeViewItem[];
changeItemProp(id: string, prop: string, val: any): void;
destroy(): void;
}