creativetimofficial / ct-material-dashboard-pro-react

React version of Material Dashboard Pro
135 stars 27 forks source link

[Bug] RTL - Material Dashboard 2 PRO React - SideNav #303

Closed IliyaBrook closed 1 year ago

IliyaBrook commented 2 years ago

Version

2.1.0

Reproduction link

https://doenshavefornow.com

Operating System

windows 11

Device

pc

Browser & Version

Version 105.0.5195.127

Steps to reproduce

  1. App.js
  2. change body tag dir document.body.setAttribute("dir", "rtl");

    What is expected?

    nav bar need flip the side to right

    What is actually happening?

    nav bar stay in left side and only the text changes position


Solution

When i set rt tag to body in app.js like this: document.body.setAttribute("dir", "rtl"); the side nav doesn't flip to right side like ti pages > rtl , in example page only the font changes as I understand MuiPaper should change the class to rtl-1ioqvny-MuiPaper-root-MuiDrawer-paper but he doesn't and stays on the class css-1ioqvny-MuiPaper-root-MuiDrawer-paper maybe I need to do something else besides adding a dir=rtl to body?

Additional comments

sajadevo commented 1 year ago

Hey everyone,

I've updated the product to v2.2.0 and this issue is fixed.

Regards, Sajad