Router: nested routes scroll to child page top

Created on 30 Jul 2018  路  2Comments  路  Source: reach/router

When I used nested routing, I found that when the subrouting page was too long and the page came in, it was positioned at the head of the self-routing rather than at the top of the entire page.

  <Router>
      <Home path="/">
        <About path="about" />
        <Support path="support" />
        <Dash path="dashboard">
          <DashHome path="/" />
          <Invoices path="invoices" />
          <Team path="team" />
        </Dash>
      </Home>
    </Router>

cat DashHome.js

export default props => (
  <div style={{ height: 1400 }}>
    <h3>Dashboard Home</h3>
  </div>
)

above code base on https://reach.tech/router/example/nested-routes

Most helpful comment

I've been having this same issue. was there any solution?

All 2 comments

hey @MG1992 , why did you close this issue? did you find the solution?

I've been having this same issue. was there any solution?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kbrgl picture kbrgl  路  4Comments

alexandernanberg picture alexandernanberg  路  3Comments

maieonbrix picture maieonbrix  路  4Comments

jsonmaur picture jsonmaur  路  4Comments

michaelwiktorek picture michaelwiktorek  路  4Comments