Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Bilal-Abdeen opened this issue Jun 14, 2024 · 0 comments
Open

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

Bilal-Abdeen opened this issue Jun 14, 2024 · 0 comments

Comments

@Bilal-Abdeen
Copy link

Bilal-Abdeen commented Jun 14, 2024

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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant