react-native-international-phone-number icon indicating copy to clipboard operation
react-native-international-phone-number copied to clipboard

In RTL mode, phone input element should display LTR

Open Bilal-Abdeen opened this issue 11 months ago • 1 comments

Thank you very much for the excellent library!

Phone numbers (like any number) should be written LTR (Left-to-Right) regardless of the language.

In the component of this library, in RTL (Right-to-Left) mode, the country code (and flag) are displayed on the right side and the phone number on the left side of the screen. This is caused by the auto swapping of components done by the React-Native RTL support. I suggest adding a prop to reverse the auto swapping.

phone_input

Bilal-Abdeen avatar Mar 06 '24 04:03 Bilal-Abdeen

I have same issue, using textInput solves the reversed numbers but for me in rtl the input is on the left and country selector is on the right, is there a way to force the component to keep ltr layout?

PPHelios avatar Mar 23 '24 17:03 PPHelios

@PPHelios @AstrOOnauta implemented my PR, which fixes the problem I demonstrated in the image above. Try using the latest version.

@PPHelios I have created a different #70 issue for reversing the digits while entering the number and using a mask. How did you manage to use TextInput to enter the phone number?

Bilal-Abdeen avatar Oct 23 '24 00:10 Bilal-Abdeen