@angular/cdk 19.1.2 → 19.1.4
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/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/overlay.mjs +57 -68
- package/fesm2022/overlay.mjs.map +1 -1
- package/fesm2022/table.mjs +13 -14
- package/fesm2022/table.mjs.map +1 -1
- package/overlay/index.d.ts +1 -6
- package/package.json +6 -2
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
package/fesm2022/table.mjs
CHANGED
|
@@ -728,20 +728,12 @@ class StickyStyler {
|
|
|
728
728
|
* @param replay Whether to enqueue this call for replay after a ResizeObserver update.
|
|
729
729
|
*/
|
|
730
730
|
updateStickyColumns(rows, stickyStartStates, stickyEndStates, recalculateCellWidths = true, replay = true) {
|
|
731
|
-
if
|
|
732
|
-
this._updateStickyColumnReplayQueue({
|
|
733
|
-
rows: [...rows],
|
|
734
|
-
stickyStartStates: [...stickyStartStates],
|
|
735
|
-
stickyEndStates: [...stickyEndStates],
|
|
736
|
-
});
|
|
737
|
-
}
|
|
731
|
+
// Don't cache any state if none of the columns are sticky.
|
|
738
732
|
if (!rows.length ||
|
|
739
733
|
!this._isBrowser ||
|
|
740
734
|
!(stickyStartStates.some(state => state) || stickyEndStates.some(state => state))) {
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
this._positionListener.stickyEndColumnsUpdated({ sizes: [] });
|
|
744
|
-
}
|
|
735
|
+
this._positionListener?.stickyColumnsUpdated({ sizes: [] });
|
|
736
|
+
this._positionListener?.stickyEndColumnsUpdated({ sizes: [] });
|
|
745
737
|
return;
|
|
746
738
|
}
|
|
747
739
|
// Coalesce with sticky row updates (and potentially other changes like column resize).
|
|
@@ -755,6 +747,13 @@ class StickyStyler {
|
|
|
755
747
|
let cellWidths;
|
|
756
748
|
let startPositions;
|
|
757
749
|
let endPositions;
|
|
750
|
+
if (replay) {
|
|
751
|
+
this._updateStickyColumnReplayQueue({
|
|
752
|
+
rows: [...rows],
|
|
753
|
+
stickyStartStates: [...stickyStartStates],
|
|
754
|
+
stickyEndStates: [...stickyEndStates],
|
|
755
|
+
});
|
|
756
|
+
}
|
|
758
757
|
this._afterNextRender({
|
|
759
758
|
earlyRead: () => {
|
|
760
759
|
cellWidths = this._getCellWidths(firstRow, recalculateCellWidths);
|
|
@@ -895,6 +894,7 @@ class StickyStyler {
|
|
|
895
894
|
if (this._stickyColumnsReplayTimeout) {
|
|
896
895
|
clearTimeout(this._stickyColumnsReplayTimeout);
|
|
897
896
|
}
|
|
897
|
+
this._resizeObserver?.disconnect();
|
|
898
898
|
this._destroyed = true;
|
|
899
899
|
}
|
|
900
900
|
/**
|
|
@@ -1040,10 +1040,9 @@ class StickyStyler {
|
|
|
1040
1040
|
_updateStickyColumnReplayQueue(params) {
|
|
1041
1041
|
this._removeFromStickyColumnReplayQueue(params.rows);
|
|
1042
1042
|
// No need to replay if a flush is pending.
|
|
1043
|
-
if (this._stickyColumnsReplayTimeout) {
|
|
1044
|
-
|
|
1043
|
+
if (!this._stickyColumnsReplayTimeout) {
|
|
1044
|
+
this._updatedStickyColumnsParamsToReplay.push(params);
|
|
1045
1045
|
}
|
|
1046
|
-
this._updatedStickyColumnsParamsToReplay.push(params);
|
|
1047
1046
|
}
|
|
1048
1047
|
/** Remove updates for the specified rows from the queue. */
|
|
1049
1048
|
_removeFromStickyColumnReplayQueue(rows) {
|