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.
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}