@toolbox-web/grid-angular 1.4.1 → 1.5.0
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.
|
@@ -1685,6 +1685,12 @@ class GridAdapter {
|
|
|
1685
1685
|
if (angularConfig.loadingRenderer && isComponentClass(angularConfig.loadingRenderer)) {
|
|
1686
1686
|
result.loadingRenderer = this.createComponentLoadingRenderer(angularConfig.loadingRenderer);
|
|
1687
1687
|
}
|
|
1688
|
+
// Process emptyRenderer - convert Angular component class to function.
|
|
1689
|
+
// `null` is a valid opt-out value (suppresses the built-in default message);
|
|
1690
|
+
// non-component values (vanilla functions, null) are forwarded unchanged.
|
|
1691
|
+
if (angularConfig.emptyRenderer && isComponentClass(angularConfig.emptyRenderer)) {
|
|
1692
|
+
result.emptyRenderer = this.createComponentEmptyRenderer(angularConfig.emptyRenderer);
|
|
1693
|
+
}
|
|
1688
1694
|
return result;
|
|
1689
1695
|
}
|
|
1690
1696
|
/**
|
|
@@ -2189,6 +2195,19 @@ class GridAdapter {
|
|
|
2189
2195
|
const mount = this.mountComponentRenderer(componentClass, (ctx) => ({ size: ctx.size }));
|
|
2190
2196
|
return (ctx) => mount(ctx).hostElement;
|
|
2191
2197
|
}
|
|
2198
|
+
/**
|
|
2199
|
+
* Creates an empty-state renderer function from an Angular component class.
|
|
2200
|
+
*
|
|
2201
|
+
* The component receives `sourceRowCount` and `filteredOut` inputs.
|
|
2202
|
+
* @internal
|
|
2203
|
+
*/
|
|
2204
|
+
createComponentEmptyRenderer(componentClass) {
|
|
2205
|
+
const mount = this.mountComponentRenderer(componentClass, (ctx) => ({
|
|
2206
|
+
sourceRowCount: ctx.sourceRowCount,
|
|
2207
|
+
filteredOut: ctx.filteredOut,
|
|
2208
|
+
}));
|
|
2209
|
+
return (ctx) => mount(ctx).hostElement;
|
|
2210
|
+
}
|
|
2192
2211
|
/**
|
|
2193
2212
|
* Create an embedded view from a `TemplateRef` and append-track it on the
|
|
2194
2213
|
* adapter's view-ref pool so it is cleaned up on `destroy()` / `unmount()`.
|