@anguless/angulux 22.3.0 → 22.3.1
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.
|
@@ -1306,7 +1306,21 @@ class Table extends BaseComponent {
|
|
|
1306
1306
|
}
|
|
1307
1307
|
}
|
|
1308
1308
|
onChanges(simpleChange) {
|
|
1309
|
-
|
|
1309
|
+
// Mirror EVERY change, not just the first.
|
|
1310
|
+
//
|
|
1311
|
+
// `totalRecords` is a plain @Input copied into `_totalRecords`, and the copy used to
|
|
1312
|
+
// happen only when `firstChange` was true — so every later value an application
|
|
1313
|
+
// supplied was dropped on the floor. Line 1212 below then wrote the stale copy back
|
|
1314
|
+
// OVER the input Angular had just set, and because the binding expression itself had
|
|
1315
|
+
// not changed on the next pass, Angular never corrected it. An application that
|
|
1316
|
+
// refetched and declared a new count kept the FIRST count forever: no error, no
|
|
1317
|
+
// warning, and a paginator sizing itself against a number that no longer described
|
|
1318
|
+
// the data underneath it.
|
|
1319
|
+
//
|
|
1320
|
+
// Measured in the browser (e2e/upstream-repro.spec.ts): shrinking five rows to two
|
|
1321
|
+
// and declaring two left the paginator rendering three pages. The four readers of
|
|
1322
|
+
// `_totalRecords` (:1212, :2064, :2132, :2209) all already assume it tracks the input.
|
|
1323
|
+
if (simpleChange.totalRecords) {
|
|
1310
1324
|
this._totalRecords = simpleChange.totalRecords.currentValue;
|
|
1311
1325
|
}
|
|
1312
1326
|
if (simpleChange.value) {
|