Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

EuiNavDrawer isLocked prop does not shift main content to the right #5

Closed

Description

@nandorojo

What

When you pass isLocked to the EuiNavDrawer, you expect the drawer to be stuck and expanded, as explained by this PR and on this forum post.

When expanded, the nav drawer should shift the main page content to the right, rather than having the nav drawer overlay the page content.

However, the content does not shift over. Instead, the nav drawer is fixed on top of the page.

Expected Behavior

It should look like this:

bdb783a8310fd42436d99148302a60d953c74505_2_480x1000

Actual Behavior

It actually looks this:

Screen Shot 2020-05-15 at 11 44 26 AM

Reproducible Example

  • Open this repository's example on Code Sandbox
  • Open src/components/chrome/index.tsx and pass isLocked prop to the EuiNavDrawer

Thanks for the great work on this. Looking forward to hearing back from you!

Activity

  1. cchaos commented on May 21, 2020

    @cchaos
    Contributor

    Hi @nandorojo!

    The EuiNavDrawer by design does not automatically shift content based on the isLocked status. This must be handled by the consuming application, you can see how this is handled in the docs example by looking at the .euiNavDrawerPage__pageBody selector.

    However, we will soon be deprecating EuiNavDrawer for EuiCollapsibleNav which will help with automatically shifting body content based on locked state.


    Note: This repo is specifically for the Next-JS starter and not where we actually develop EUI. If you need to submit more component-specific issues, I'd recommend doing so in https://github.com/elastic/eui

  2. pugnascotia commented on May 21, 2020

    @pugnascotia
    Contributor

    Thanks @cchaos. So technically there's nothing to fix for this issue, however I'll leave it open until I've updated the starter to use EuiCollapsibleNav.

  3. nandorojo commented on May 21, 2020

    @nandorojo
    Author

    Got it, thank you both for the help! I’ll try out EuiCollapsibleNav instead.

    Big fan of your work, thanks for an awesome library.

  4. pugnascotia commented on Jun 5, 2020

    @pugnascotia
    Contributor

    So it turns out EuiCollapsibleNav needs updating to work with SSR first. Hey ho.

  5. nandorojo commented on Jul 19, 2020

    @nandorojo
    Author

    I can close this for now and just lazy-load in EuiCollapsibleNav. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions