chrv-components 1.12.47 → 1.12.49
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.
|
Binary file
|
|
@@ -7134,6 +7134,7 @@ class AutoDataTable extends BaseTable {
|
|
|
7134
7134
|
class AutoDataSource {
|
|
7135
7135
|
constructor(config) {
|
|
7136
7136
|
// Signaux internes
|
|
7137
|
+
this._datagrid = signal(null, ...(ngDevMode ? [{ debugName: "_datagrid" }] : []));
|
|
7137
7138
|
this._data = signal(undefined, ...(ngDevMode ? [{ debugName: "_data" }] : []));
|
|
7138
7139
|
this._currentPage = signal(1, ...(ngDevMode ? [{ debugName: "_currentPage" }] : []));
|
|
7139
7140
|
this._pageSize = signal(10, ...(ngDevMode ? [{ debugName: "_pageSize" }] : []));
|
|
@@ -7183,13 +7184,18 @@ class AutoDataSource {
|
|
|
7183
7184
|
this._data.set(this.config.initialData);
|
|
7184
7185
|
}
|
|
7185
7186
|
this._pageSize.set(this.config.pageSize);
|
|
7187
|
+
effect(() => {
|
|
7188
|
+
if (this.processedData() && this._datagrid()) {
|
|
7189
|
+
this._datagrid()?.table.set(this.processedData());
|
|
7190
|
+
}
|
|
7191
|
+
});
|
|
7186
7192
|
}
|
|
7187
7193
|
// Méthode pour enregistrer la datagrid et écouter les événements de base
|
|
7188
7194
|
registerDataGrid(element) {
|
|
7189
|
-
if (!element
|
|
7195
|
+
if (!element)
|
|
7190
7196
|
return;
|
|
7191
|
-
const datagrid = element.nativeElement;
|
|
7192
|
-
|
|
7197
|
+
const datagrid = (element instanceof ElementRef ? element.nativeElement : element);
|
|
7198
|
+
this._datagrid.set(datagrid);
|
|
7193
7199
|
datagrid.pageChange.subscribe((page) => {
|
|
7194
7200
|
this.handlePageChange(page).subscribe();
|
|
7195
7201
|
});
|