Here is the the type definition of the tree constructor:
export interface ITreeConfig extends IDragConfig {
data?: TreeCollection<any> | any[];
css?: string;
keyNavigation?: boolean;
autoload?: string;
checkbox?: boolean;
isFolder?: (obj: any) => boolean;
icon?: ITreeCustomIcon;
editable?: boolean;
selection?: boolean;
rootId?: Id;
itemHeight?: number | string;
template?: (item: ITreeItem, isFolder: boolean) => string;
eventHandlers?: {
[eventName: string]: {
[className: string]: (event: Event, item: ITree) => void | boolean;
};
};
collapsed?: boolean;
$editable?: boolean;
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
editing?: boolean;
}
The eventHandlers callback function has item: ITree which seems to be wrong. Maybe it should be ITreeItem ?