Commit 2bece45
committed
fix(ios/fabric): stop overriding JS width in Yoga layout
The `adopt` method in `ComponentDescriptors.h` called `setSize()` with
both width and height from `sizeThatFits:UILayoutFittingCompressedSize`.
Because `UIDatePicker` has a native minimum width of 280pt, this forced
a fixed width on the Yoga node, overriding any JS style such as
`width: "100%"`.
Only set the **height** from the native measurement and let the JS side
control the width through regular Yoga styles.
Adds `setMeasuredHeight()` to `RNDateTimePickerShadowNode` which sets
only `yoga::Dimension::Height` on the Yoga node style, leaving the
width dimension untouched.
Fixes #10141 parent 2a26378 commit 2bece45
File tree
2 files changed
+9
-3
lines changed- ios/fabric/cpp/react/renderer/components/RNDateTimePicker
2 files changed
+9
-3
lines changedLines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | | - | |
29 | | - | |
| 27 | + | |
| 28 | + | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
| |||
0 commit comments