@trudb/tru-common-lib 0.1.951 → 0.1.954
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5901,7 +5901,7 @@ class TruDataGridHeader {
|
|
|
5901
5901
|
noSort = 'inactive';
|
|
5902
5902
|
isHovering = false;
|
|
5903
5903
|
columnMenuIsOpen = false;
|
|
5904
|
-
showFilterMenu =
|
|
5904
|
+
showFilterMenu = false;
|
|
5905
5905
|
agInit(params) {
|
|
5906
5906
|
this.params = params;
|
|
5907
5907
|
this.params.column.addEventListener('sortChanged', this.onSortChanged.bind(this));
|
|
@@ -5956,6 +5956,8 @@ class TruDataGridHeader {
|
|
|
5956
5956
|
onFilterMenuButtonClicked(event) {
|
|
5957
5957
|
if (!this.columnMenuIsOpen) {
|
|
5958
5958
|
this.params.showColumnMenu(event.target, () => {
|
|
5959
|
+
this.columnMenuIsOpen = false;
|
|
5960
|
+
this.showFilterMenu = this.isHovering && this.params.api.getDisplayedRowCount() > 0 || this.columnMenuIsOpen;
|
|
5959
5961
|
});
|
|
5960
5962
|
this.columnMenuIsOpen = true;
|
|
5961
5963
|
}
|
|
@@ -5964,6 +5966,14 @@ class TruDataGridHeader {
|
|
|
5964
5966
|
this.columnMenuIsOpen = false;
|
|
5965
5967
|
}
|
|
5966
5968
|
}
|
|
5969
|
+
onHeaderMouseEnter(event) {
|
|
5970
|
+
this.isHovering = true;
|
|
5971
|
+
this.showFilterMenu = this.isHovering && this.params.api.getDisplayedRowCount() > 0 || this.columnMenuIsOpen;
|
|
5972
|
+
}
|
|
5973
|
+
onHeaderMouseLeave(event) {
|
|
5974
|
+
this.isHovering = false;
|
|
5975
|
+
this.showFilterMenu = this.isHovering && this.params.api.getDisplayedRowCount() > 0 || this.columnMenuIsOpen;
|
|
5976
|
+
}
|
|
5967
5977
|
ngOnDestroy() {
|
|
5968
5978
|
this.params.column.removeEventListener('sortChanged', this.onSortChanged.bind(this));
|
|
5969
5979
|
this.params.api.removeEventListener('cellFocused', this.onCellFocused.bind(this));
|
|
@@ -5971,7 +5981,7 @@ class TruDataGridHeader {
|
|
|
5971
5981
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: TruDataGridHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5972
5982
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: TruDataGridHeader, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "headerRef", first: true, predicate: ["header"], descendants: true }], ngImport: i0, template: `
|
|
5973
5983
|
<div #header class="ag-cell-label-container" role="presentation">
|
|
5974
|
-
<div ref="eLabel" class="ag-header-cell-label" role="presentation" (mouseenter)="
|
|
5984
|
+
<div ref="eLabel" class="ag-header-cell-label" role="presentation" (mouseenter)="onHeaderMouseEnter($event)" (mouseleave)="onHeaderMouseLeave($event)">
|
|
5975
5985
|
<div class="ag-header-control-container">
|
|
5976
5986
|
<div>
|
|
5977
5987
|
<span ref="eText" class="ag-header-cell-text">{{params.displayName}}</span>
|
|
@@ -5989,7 +5999,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
5989
5999
|
type: Component,
|
|
5990
6000
|
args: [{ standalone: true, imports: [NgIf, NgClass, CommonModule, MatIconModule], template: `
|
|
5991
6001
|
<div #header class="ag-cell-label-container" role="presentation">
|
|
5992
|
-
<div ref="eLabel" class="ag-header-cell-label" role="presentation" (mouseenter)="
|
|
6002
|
+
<div ref="eLabel" class="ag-header-cell-label" role="presentation" (mouseenter)="onHeaderMouseEnter($event)" (mouseleave)="onHeaderMouseLeave($event)">
|
|
5993
6003
|
<div class="ag-header-control-container">
|
|
5994
6004
|
<div>
|
|
5995
6005
|
<span ref="eText" class="ag-header-cell-text">{{params.displayName}}</span>
|