Open bogas04 opened 7 years ago
I tried to read the gh-pages source but couldn't understand it much.
Anyway, in case ReactRouter is being used, we can simply do following to Router
onUpdate={() => document.body.scrollTop = 0}
The website is autogenerated, that's why ;) The code lives here if you want: https://github.com/react-mdl/react-mdl/tree/master/docs
Thanks !
Maybe we can use document.body here
const content = document.body; if (content) { content.scrollTop = 0; }
I'll try to create a PR in evening.
I tried to read the gh-pages source but couldn't understand it much.
Anyway, in case ReactRouter is being used, we can simply do following to Router