MuhammedAlmaz/React-Native-INTL-Phone-Input

In RTL mode, phone input element should display in LTR order!

Opened this issue · 0 comments

Thank you very much for the excellent library!

Phone numbers (like all numbers) should be written in LTR (Left-to-Right) regardless of the language used.

In this library, and while using an RTL (Right-to-Left) mode for the app, the country code (and flag) are displayed on the right side and the phone number is displayed on the left side of the screen. This is NOT right. It should be the other way around - regardless of the language of the app. 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.
flag_countrycode

To test it:

import { I18nManager, } from "react-native";
import RNRestart from "react-native-restart";

// force RTL and restart the app. Restarting is necessary for the direction change to take effect.
I18nManager.allowRTL(true);
I18nManager.forceRTL(true);
RNRestart.restart();