Skip to content

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

@Bilal-Abdeen

Description

@Bilal-Abdeen

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();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions