Skip to content

Provide iOS-compatible implementation for direction property #4668

@kmelmon

Description

@kmelmon

While investigating #4499 I started playing around with the direction property and found it doesn't work correctly.

To see this in action, see:
https://snack.expo.io/JV!BvpeCj

If you run this on iOS, the buttons and the Picker will flow RTL
If you run this on react-native-windows, the buttons will flow LTR, but the Picker will flow RTL

The basic problem is in RNW's code that handles the direction property. We let yoga do the layout in RTL, but then we set the FlowDirection property on the backing XAML element. This flips the RN children back to LTR. But a native component like Picker will still pick up the XAML RightToLeft. So you end up with a weird mix of LTR and RTL.

This bug is tracking fixing this by providing a "correct" implementation for direction. iOS does it correctly. We should too.

Metadata

Metadata

Assignees

Labels

Breaking ChangeThis PR will break existing apps and should be part of the known breaking changes for the releasebug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions