jqwidgets-framework
Version:
jQWidgets is an advanced Angular, Vue, Blazor, React, Web Components, jquery, ASP .NET MVC, Custom Elements and HTML5 UI framework.
62 lines (49 loc) • 1.68 kB
text/typescript
import { Component, ViewChild, ElementRef } from '@angular/core';
import { jqxButtonComponent } from 'jqwidgets-ng/jqxbuttons';
import { jqxWindowComponent } from 'jqwidgets-ng/jqxwindow';
export class AppComponent {
customWindow: jqxWindowComponent;
searchTextButton: jqxButtonComponent;
searchTextInput: ElementRef;
_searchButtonHandle = () => {
if (this.searchTextInput.nativeElement !== null) {
if (this.searchTextInput.nativeElement.value !== '') {
this.searchTextButton.disabled(false);
}
else {
this.searchTextButton.disabled(true);
}
}
}
onKey(event: any): void {
this._searchButtonHandle();
};
onKeyUp(event: any): void {
this._searchButtonHandle();
};
onChange(event: any): void {
this._searchButtonHandle();
};
showWindowButtonClick(): void {
this.customWindow.open();
}
hideWindowButtonClick(): void {
this.customWindow.close();
}
pinWindowButtonClick(): void {
this.customWindow.draggable(false);
}
unpinWindowButtonClick(): void {
this.customWindow.draggable(true);
}
collapseWindowButtonClick(): void {
this.customWindow.collapse();
}
expandWindowButtonClick(): void {
this.customWindow.expand();
}
}