Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Metronic react Theme sidebar scrolling issue


Hii,

I got sidebar scroll issue as shown in below screencast. When I move to any pages which don't have side bar i.e. in 404 page as shown in video, Then I move back to pages in which side bar is there then in this case sidebar hang up and can't able to scroll sidebar. I must refresh page for working properly again.

If anyone have solution then please let me know it will help a lot to me.

Please find below screencast for mentioned issue.


Thanks.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi,

We reproduced this error. The issue is related to our components initialization, currently, ScrollComponent gets initialized only on the first-page load.

To fix this you can change the file src/_metronic/helpers/initializationHelper.ts with the content below which will reinitialize all components when the router gets changed:

import {ReactNode} from "react"
import {
DrawerComponent,
MenuComponent,
ScrollComponent,
StickyComponent, SwapperComponent,
ToggleComponent
} from "../assets/ts/components"

type WithChildren = {
children?: ReactNode
}

const reInitMenu = () => {
setTimeout(() => {
ToggleComponent.reinitialization();
StickyComponent.reInitialization();
MenuComponent.reinitialization();
ScrollComponent.reinitialization();
DrawerComponent.reinitialization();
SwapperComponent.reinitialization();
}, 500)
}

export {type WithChildren, reInitMenu}


Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(