@trudb/tru-common-lib 0.0.600 → 0.0.602
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.
- package/esm2020/lib/components/data-grid/overlays/tru-data-grid-no-rows-overlay/tru-data-grid-no-rows-overlay.mjs +5 -5
- package/esm2020/lib/components/data-grid/tru-data-grid.mjs +9 -2
- package/fesm2015/trudb-tru-common-lib.mjs +12 -5
- package/fesm2015/trudb-tru-common-lib.mjs.map +1 -1
- package/fesm2020/trudb-tru-common-lib.mjs +12 -5
- package/fesm2020/trudb-tru-common-lib.mjs.map +1 -1
- package/lib/components/data-grid/tru-data-grid.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2248,8 +2248,8 @@ class TruDataGridNoRowsOverlay {
|
|
|
2248
2248
|
}
|
|
2249
2249
|
TruDataGridNoRowsOverlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruDataGridNoRowsOverlay, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2250
2250
|
TruDataGridNoRowsOverlay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: TruDataGridNoRowsOverlay, isStandalone: true, selector: "tru-data-grid-no-rows-overlay", ngImport: i0, template: `
|
|
2251
|
-
<div class="ag-overlay-loading-center"
|
|
2252
|
-
<span>{{ params.noRowsMessageFunc() }}</span>
|
|
2251
|
+
<div class="ag-overlay-loading-center">
|
|
2252
|
+
<span style="font-size:14px font-weight: bold;">{{ params.noRowsMessageFunc() }}</span>
|
|
2253
2253
|
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: MaterialModule }] });
|
|
2254
2254
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruDataGridNoRowsOverlay, decorators: [{
|
|
2255
2255
|
type: Component,
|
|
@@ -2258,8 +2258,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
2258
2258
|
selector: 'tru-data-grid-no-rows-overlay',
|
|
2259
2259
|
imports: [MaterialModule],
|
|
2260
2260
|
template: `
|
|
2261
|
-
<div class="ag-overlay-loading-center"
|
|
2262
|
-
<span>{{ params.noRowsMessageFunc() }}</span>
|
|
2261
|
+
<div class="ag-overlay-loading-center">
|
|
2262
|
+
<span style="font-size:14px font-weight: bold;">{{ params.noRowsMessageFunc() }}</span>
|
|
2263
2263
|
</div>`
|
|
2264
2264
|
}]
|
|
2265
2265
|
}] });
|
|
@@ -2867,6 +2867,7 @@ class TruDataGrid {
|
|
|
2867
2867
|
this.gridType = TruDataGridTypes.Search;
|
|
2868
2868
|
this.unsavedEntities = [];
|
|
2869
2869
|
this.loadedEntities = [];
|
|
2870
|
+
this.firstSearchRan = false;
|
|
2870
2871
|
this.gridOptions = {
|
|
2871
2872
|
rowSelection: 'multiple',
|
|
2872
2873
|
rowStyle: { background: 'white' },
|
|
@@ -2876,7 +2877,12 @@ class TruDataGrid {
|
|
|
2876
2877
|
},
|
|
2877
2878
|
noRowsOverlayComponent: TruDataGridNoRowsOverlay,
|
|
2878
2879
|
noRowsOverlayComponentParams: {
|
|
2879
|
-
noRowsMessageFunc: () =>
|
|
2880
|
+
noRowsMessageFunc: () => {
|
|
2881
|
+
if (this.firstSearchRan)
|
|
2882
|
+
return 'Sorry - no rows found!';
|
|
2883
|
+
else
|
|
2884
|
+
return 'Click search to display results.';
|
|
2885
|
+
},
|
|
2880
2886
|
},
|
|
2881
2887
|
onSelectionChanged: (params) => { },
|
|
2882
2888
|
onCellEditingStopped: (params) => {
|
|
@@ -3001,6 +3007,7 @@ class TruDataGrid {
|
|
|
3001
3007
|
}
|
|
3002
3008
|
};
|
|
3003
3009
|
this.onSearch = (setupQuery) => {
|
|
3010
|
+
this.firstSearchRan = true;
|
|
3004
3011
|
this.gridOptions.api.hideOverlay();
|
|
3005
3012
|
this.gridOptions.api.showLoadingOverlay();
|
|
3006
3013
|
let entityLoaded = this.loadedEntities.some((ref) => { return ref === this.entity[this.entity.constructor.name + 'Ref']; });
|