Commit db0029e
committed
fix(ios): resolve scrollEnabled prop initialization timing issue
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 db0029e
1 file changed
+17
-3
lines changed| 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 | + | |
| 70 | + | |
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
| |||
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
| 83 | + | |
79 | 84 | | |
80 | 85 | | |
81 | 86 | | |
| |||
126 | 131 | | |
127 | 132 | | |
128 | 133 | | |
| 134 | + | |
129 | 135 | | |
130 | 136 | | |
131 | 137 | | |
| |||
143 | 149 | | |
144 | 150 | | |
145 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
146 | 158 | | |
147 | 159 | | |
148 | 160 | | |
| |||
165 | 177 | | |
166 | 178 | | |
167 | 179 | | |
168 | | - | |
169 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
170 | 183 | | |
171 | 184 | | |
172 | 185 | | |
| |||
387 | 400 | | |
388 | 401 | | |
389 | 402 | | |
390 | | - | |
| 403 | + | |
| 404 | + | |
391 | 405 | | |
392 | 406 | | |
393 | 407 | | |
| |||
0 commit comments