jqwidgets-framework
Version:
jQWidgets is an advanced Angular, Vue, Blazor, React, Web Components, jquery, ASP .NET MVC, Custom Elements and HTML5 UI framework.
30 lines (22 loc) • 826 B
text/typescript
import { Component, ViewChild, AfterViewInit, ElementRef } from '@angular/core';
import { jqxTreeComponent } from 'jqwidgets-ng/jqxtree';
({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent implements AfterViewInit {
('myTree', { static: false }) myTree: jqxTreeComponent;
('ContentPanel', { static: false }) ContentPanel: ElementRef;
getWidth() : any {
if (document.body.offsetWidth < 650) {
return '90%';
}
return 650;
}
ngAfterViewInit() {
this.myTree.elementRef.nativeElement.firstChild.style.border = 'none';
}
select(event: any): void {
this.ContentPanel.nativeElement.innerHTML = "<div style='margin: 10px;'>" + event.args.element.id + "</div>";
}
}