Repository navigation
Commit 9419c74
committed
fix(VirtualizedList): sync virtualization logic with local direction style
Summary:
This commit fixes the blank rendering issue (Issue #55433) that occurs when a
VirtualizedList is used in an RTL environment but explicitly styled as LTR.
The root cause was a mismatch between the JS-level coordinate normalization
and the Native-level layout direction. While the native ScrollView rendered
as LTR, the JS logic still applied RTL mirror calculations based on the
global I18nManager state.
Changes:
1. Updated `_orientation()` to prioritize the component's `style.direction`
over the global `I18nManager.isRTL` setting.
2. In `render()`, explicitly calculated an `orientationStyle` based on the
resolved direction and injected it into the ScrollView's style array.
3. This ensures that `_offsetFromScrollEvent` always uses a coordinate system
that is perfectly aligned with the actual rendered layout.
Fixes: #554331 parent df6f8ea commit 9419c74
1 file changed
Lines changed: 22 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
924 | 924 | | |
925 | 925 | | |
926 | 926 | | |
| 927 | + | |
927 | 928 | | |
928 | 929 | | |
929 | | - | |
| 930 | + | |
930 | 931 | | |
931 | 932 | | |
| 933 | + | |
932 | 934 | | |
933 | 935 | | |
934 | 936 | | |
| |||
1106 | 1108 | | |
1107 | 1109 | | |
1108 | 1110 | | |
1109 | | - | |
1110 | | - | |
| 1111 | + | |
| 1112 | + | |
1111 | 1113 | | |
1112 | 1114 | | |
1113 | 1115 | | |
| |||
1502 | 1504 | | |
1503 | 1505 | | |
1504 | 1506 | | |
1505 | | - | |
| 1507 | + | |
1506 | 1508 | | |
1507 | 1509 | | |
1508 | 1510 | | |
| |||
1517 | 1519 | | |
1518 | 1520 | | |
1519 | 1521 | | |
1520 | | - | |
1521 | | - | |
1522 | | - | |
1523 | | - | |
1524 | | - | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
1525 | 1532 | | |
1526 | 1533 | | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
1527 | 1540 | | |
1528 | 1541 | | |
1529 | 1542 | | |
| |||
0 commit comments