Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a prop to force Layout to know it has a Sider (with SSR) #8937

Closed
eduludi opened this issue Jan 11, 2018 · 1 comment
Closed

Add a prop to force Layout to know it has a Sider (with SSR) #8937

eduludi opened this issue Jan 11, 2018 · 1 comment
Assignees
Labels

Comments

@eduludi
Copy link
Contributor

@eduludi eduludi commented Jan 11, 2018

What problem does this feature solve?

This will prevent the layout from flickering when loading after server-side rendering (SSR).

Example:

<Layout>
  <Layout.Sider />
  <Layout>
    <Layout.Content />
  </Layout>
</Layout>

As it is, Layout.Content appears below Layout.Sider during an instant, and only after the JS load is done it sets in the right position.

What does the proposed API look like?

<Layout hasSider />
<Layout hasSider={true} />

or

<Layout withSider />
<Layout withSider={true} />
@yesmeck
Copy link
Member

@yesmeck yesmeck commented Jan 12, 2018

afc163 added a commit that referenced this issue Jan 12, 2018
close #8937
@afc163 afc163 closed this Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants