Commit 7ec1e48
refactor(cdk/overlay): Reduce dependency on NgZone (#28332)
* fix(cdk/overlay): Allow cdk overlay to work with `NoopNgZone`
This updates the overlay implementation to use `afterNextRender` instead
of `ngZone.onStable` which does not emit at all in zoneless
applications. For zone-based applications, this means that the overlay
will be positioned immediately after the next ApplicationRef tick. This is slightly
different from `onStable`, which with ZoneJS can span multiple change
detection rounds.
* test: update API golden
---------
Co-authored-by: Miles Malerba <[email protected]>1 parent 1012304 commit 7ec1e48
File tree
6 files changed
+41
-55
lines changed- src/cdk/overlay
- position
- tools/public_api_guard/cdk
6 files changed
+41
-55
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
12 | 18 | | |
13 | 19 | | |
14 | | - | |
| 20 | + | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
| |||
65 | 71 | | |
66 | 72 | | |
67 | 73 | | |
| 74 | + | |
68 | 75 | | |
69 | 76 | | |
70 | 77 | | |
| |||
125 | 132 | | |
126 | 133 | | |
127 | 134 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
137 | 146 | | |
138 | 147 | | |
139 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| |||
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | 58 | | |
64 | 59 | | |
65 | 60 | | |
| |||
404 | 399 | | |
405 | 400 | | |
406 | 401 | | |
407 | | - | |
408 | 402 | | |
409 | 403 | | |
410 | 404 | | |
| |||
510 | 504 | | |
511 | 505 | | |
512 | 506 | | |
513 | | - | |
514 | 507 | | |
515 | 508 | | |
516 | 509 | | |
| |||
533 | 526 | | |
534 | 527 | | |
535 | 528 | | |
536 | | - | |
537 | 529 | | |
538 | 530 | | |
539 | 531 | | |
| |||
573 | 565 | | |
574 | 566 | | |
575 | 567 | | |
576 | | - | |
577 | 568 | | |
578 | 569 | | |
579 | 570 | | |
| |||
606 | 597 | | |
607 | 598 | | |
608 | 599 | | |
609 | | - | |
610 | 600 | | |
611 | 601 | | |
612 | 602 | | |
| |||
889 | 879 | | |
890 | 880 | | |
891 | 881 | | |
892 | | - | |
893 | 882 | | |
894 | 883 | | |
895 | 884 | | |
| |||
947 | 936 | | |
948 | 937 | | |
949 | 938 | | |
950 | | - | |
951 | 939 | | |
952 | 940 | | |
953 | 941 | | |
| |||
971 | 959 | | |
972 | 960 | | |
973 | 961 | | |
974 | | - | |
975 | | - | |
976 | | - | |
977 | | - | |
978 | | - | |
979 | | - | |
980 | | - | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
981 | 969 | | |
982 | 970 | | |
983 | 971 | | |
| |||
1061 | 1049 | | |
1062 | 1050 | | |
1063 | 1051 | | |
1064 | | - | |
1065 | 1052 | | |
1066 | 1053 | | |
1067 | 1054 | | |
| |||
1095 | 1082 | | |
1096 | 1083 | | |
1097 | 1084 | | |
1098 | | - | |
1099 | 1085 | | |
1100 | 1086 | | |
1101 | 1087 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
Lines changed: 7 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | | - | |
33 | 31 | | |
34 | 32 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
43 | 36 | | |
44 | 37 | | |
45 | 38 | | |
| |||
53 | 46 | | |
54 | 47 | | |
55 | 48 | | |
56 | | - | |
| 49 | + | |
57 | 50 | | |
58 | 51 | | |
59 | 52 | | |
| |||
1499 | 1492 | | |
1500 | 1493 | | |
1501 | 1494 | | |
1502 | | - | |
1503 | 1495 | | |
1504 | 1496 | | |
1505 | 1497 | | |
| |||
1547 | 1539 | | |
1548 | 1540 | | |
1549 | 1541 | | |
1550 | | - | |
1551 | 1542 | | |
1552 | 1543 | | |
1553 | 1544 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
15 | | - | |
16 | 13 | | |
17 | 14 | | |
18 | 15 | | |
| |||
29 | 26 | | |
30 | 27 | | |
31 | 28 | | |
32 | | - | |
| 29 | + | |
33 | 30 | | |
34 | 31 | | |
35 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
359 | 360 | | |
360 | 361 | | |
361 | 362 | | |
362 | | - | |
| 363 | + | |
363 | 364 | | |
364 | 365 | | |
365 | 366 | | |
| |||
0 commit comments