codexly-ui 0.10.2 → 0.10.3
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/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -11599,7 +11599,9 @@ class ClxPaginationComponent {
|
|
|
11599
11599
|
});
|
|
11600
11600
|
// Mientras el usuario no haya elegido un pageSize a propósito, si el default provisto por el
|
|
11601
11601
|
// padre excede totalItems, se ajusta al más pequeño disponible en vez de quedar seleccionado
|
|
11602
|
-
// como si fuera el "más grande elegido".
|
|
11602
|
+
// como si fuera el "más grande elegido". Debe emitir pageChange/sizeChange igual que la
|
|
11603
|
+
// selección manual — si no, el consumidor (ej. clx-table → su padre real) nunca se entera
|
|
11604
|
+
// del nuevo tamaño y sigue pidiendo datos al backend con el size viejo.
|
|
11603
11605
|
effect(() => {
|
|
11604
11606
|
if (this._userTouchedPageSize)
|
|
11605
11607
|
return;
|
|
@@ -11609,6 +11611,9 @@ class ClxPaginationComponent {
|
|
|
11609
11611
|
const smallest = this._pageSizeOptions()[0]?.value;
|
|
11610
11612
|
if (smallest != null && this.pageSize() > total && smallest !== this.pageSize()) {
|
|
11611
11613
|
this.pageSize.set(smallest);
|
|
11614
|
+
this.currentPage.set(1);
|
|
11615
|
+
this.sizeChange.emit({ pageSize: smallest });
|
|
11616
|
+
this.pageChange.emit({ page: 1, pageSize: smallest });
|
|
11612
11617
|
}
|
|
11613
11618
|
});
|
|
11614
11619
|
// Sincroniza el FormControl → pageSize model cuando el usuario elige
|