We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 73bd214 + 33dc9a9 commit 5975ae1Copy full SHA for 5975ae1
packages/react-renderer-demo/src/common/component/renderer-doc-page.js
@@ -39,7 +39,15 @@ const RendererDocPage = ({ match: { params: { component }}}) => {
39
const [ Component, setComponent ] = useState();
40
const classes = useStyles();
41
useEffect(() => {
42
- const OtherComponent = lazy(() => import(`docs/components/${component}.md`));
+ const OtherComponent = lazy(() => import(`docs/components/${component}.md`).then((m) => {
43
+ setImmediate(() => {
44
+ const h = window.location.hash;
45
+ window.location.hash = '';
46
+ window.location.hash = h.replace('#', '');
47
+ });
48
+ return m;
49
+ }));
50
+ window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
51
setComponent(OtherComponent);
52
}, [ component ]);
53
return (
0 commit comments