Mantis Theme Layout Selection Issue

Closed
G General March 13, 2023
Login to reply
Sandesh
1 year ago

Okay thanks

Amit Gorasiya
1 year ago

Hey, Sandesh

    We used a fixed permanent mini-menu below media 1366, for responsive media purposes.
    If you want to remove the permanent mini-menu, replace the attached file 
    index.tsx - src/layout/MainLayout/Header
    MiniDrawerStyled.ts - src/layout/MainLayout/Drawer

    If you still have any queries, contact us

Regards,
Amit Gorasiya

Sandesh
1 year ago

Hi,

But, the provided code doesn't fix the issue. The provided code will work for higher resolution screens like (1920 * 1080) and above, but for lower resolutions like (1366 * 768) or lower the code doesn't seem to work, that's why I suggested you guys to look at the MainLayout as well. 

Thanks,
Sandesh

Coded Themes Support Agent
1 year ago

Hi,


We haven't applied the fix on the live site. Please replace the code that we already provided in your local to fix the issue on your side.  This bug will be deployed in the next release.


Regards,

Rakesh

Sandesh
1 year ago

Hey,

Can you provide the coding logics you did to fix that in localhost? as in your https://mantisdashboard.io the issue is there

Amit Gorasiya
1 year ago

Hey Sandesh

       We try again previous solution shared with you it's working.
       Please try in Incognito or clear browser cache. 

Sandesh
1 year ago

I think you may need to do something to MainLayout as well because the ThemeLayout is not rendered in the page refresh, when the browser/page is refreshed it doesn't take values from local storage some how. So you may need to do something to the main layout as well. 

Sandesh
1 year ago

Still, the issue is the same

Amit Gorasiya
1 year ago

Hi Sandesh,

Open the ThemeLayout.tsx file in the Customization directory and replace the below function.

const handleRadioChange = (event: ChangeEvent<HTMLInputElement>) => {
    const newValue = event.target.value;
    setValue(newValue);
    if (newValue === 'default') {
      if (miniDrawer === true) {
        onChangeMiniDrawer(false);
      }
      if (themeDirection === 'rtl') {
        onChangeDirection('ltr');
      }
      if (!drawerOpen) {
        dispatch(openDrawer({ drawerOpen: true }));
      }
    }
    if (newValue === 'mini') {
      onChangeMiniDrawer(true);
      if (drawerOpen) {
        dispatch(openDrawer({ drawerOpen: false }));
      }
    }
    if (newValue === 'rtl') {
      onChangeDirection('rtl');
    }
  };

If you still have any queries, contact us

Regards,
Amit

Sandesh
1 year ago

Hey, sorry for the delayed reply, I tried in incognito mode, and even in multiple browsers as well. but the issue is the same

Coded Themes Support Agent
1 year ago

Hi Sandesh,


Can you try replicating the scenario in incognito as we are saving values in local storage and sometimes it takes old values if the user has not cleared it.


Regards,

Rakesh

Sandesh
1 year ago

Hi there, 

I have another issue with the mantis template, where the Theme Customization > Theme Layout has an issue where even after selecting default it automatically goes back to the mini drawer, I have attached a video to further explain and to give an overview of the issue. Please do provide some code fixes, I need help with this asap. 

Additional Info

Purchase From?: MUI

Name of Product/template: Mantis