Commit d1775a6
authored
fix(ios): resolve scrollEnabled prop initialization timing issue (#1041)
Store scrollEnabled state in an ivar and apply it when the scroll view becomes available, rather than attempting to set it before initialization. This ensures the prop works reliably regardless of when props are updated relative to UIPageViewController setup.
Also reset scrollEnabled to its default value (YES) in prepareForRecycle to prevent recycled components from retaining the previous instance's scroll state.
Update setScrollEnabledImperatively to use the new state management pattern by updating the ivar and calling applyScrollEnabled, ensuring consistency whether called before or after scrollView initialization.1 parent 12fc806 commit d1775a6
File tree
5 files changed
+19
-9
lines changed- .github/workflows
- example
- ios
- ios
5 files changed
+19
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | | - | |
| 41 | + | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
| |||
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1332 | 1332 | | |
1333 | 1333 | | |
1334 | 1334 | | |
1335 | | - | |
| 1335 | + | |
1336 | 1336 | | |
1337 | 1337 | | |
1338 | 1338 | | |
| |||
2321 | 2321 | | |
2322 | 2322 | | |
2323 | 2323 | | |
2324 | | - | |
| 2324 | + | |
2325 | 2325 | | |
2326 | 2326 | | |
2327 | 2327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| 68 | + | |
| 69 | + | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| |||
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| 82 | + | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| |||
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
| 133 | + | |
129 | 134 | | |
130 | 135 | | |
131 | 136 | | |
| |||
143 | 148 | | |
144 | 149 | | |
145 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
146 | 155 | | |
147 | 156 | | |
148 | 157 | | |
| |||
165 | 174 | | |
166 | 175 | | |
167 | 176 | | |
168 | | - | |
169 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
170 | 180 | | |
171 | 181 | | |
172 | 182 | | |
| |||
387 | 397 | | |
388 | 398 | | |
389 | 399 | | |
390 | | - | |
| 400 | + | |
| 401 | + | |
391 | 402 | | |
392 | 403 | | |
393 | 404 | | |
| |||
0 commit comments