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
🐛 Bug Ant Design Team had proved that this is a bug.

Comments

@eduludi
Copy link
Contributor

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} />
@afc163 afc163 added the 🐛 Bug Ant Design Team had proved that this is a bug. label Jan 12, 2018
@yesmeck
Copy link
Member

yesmeck commented Jan 12, 2018

#8604

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Ant Design Team had proved that this is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants