flyonui
Version:
The easiest, free and open-source Tailwind CSS component library with semantic classes.
26 lines (21 loc) • 546 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
}