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

Arrow Direction Not Changing Based on Language/Orientation (RTL/LTR) #369

Closed
SyedMisbahUrRehman opened this issue Apr 27, 2024 · 2 comments

Comments

@SyedMisbahUrRehman
Copy link

I'm using React Complex Tree in my React application to display a tree view. The small arrows next to folders, which indicate expand/collapse functionality, are currently rendered in the Left-to-Right (LTR) direction.

However, when I switch the application language to Arabic (Right-to-Left, RTL) or the device orientation changes, the arrow direction doesn't automatically adjust. This creates a visual inconsistency for users.

Expected Behavior:

The arrow direction should dynamically change based on the document's direction (RTL or LTR) to maintain a consistent user experience across languages and orientations.

Looking For:

Suggestions on the most effective way to handle dynamic arrow direction changes in React Complex Tree based on language and orientation.
Are there plans for built-in support for this functionality in future versions?

lukasbach added a commit that referenced this issue Apr 30, 2024
@lukasbach
Copy link
Owner

Hi, thanks for the report. Theoretically, since RCT allows library consumers to use a custom render implementation, this could be custom-implemented before. But since this wasn't possible with the default renderers, I've added a way to achieve this with the built-in renderers as of v2.4.3. See https://rct.lukasbach.com/docs/guides/accessibility#right-to-left-mode-rtl for details.

@SyedMisbahUrRehman
Copy link
Author

Thanks a lot man. Much appreciated

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

2 participants