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

b-nav-item-dropdown with dropup drops the menu down instead of up #1176

Closed
gildas opened this issue Oct 8, 2017 · 4 comments
Closed

b-nav-item-dropdown with dropup drops the menu down instead of up #1176

gildas opened this issue Oct 8, 2017 · 4 comments

Comments

@gildas
Copy link

gildas commented Oct 8, 2017

BootstrapVue version 1.0.0-beta.9

When using the option dropup for a b-nav-item-dropdown, the menu will drop down instead of up.

<b-nav-item-dropdown dropup right>
  title
  <b-dropdown-item>value1</b-dropdown-item>
  <b-dropdown-item>value2</b-dropdown-item>
  <b-dropdown-item>value3</b-dropdown-item>
</b-nav-item-dropdown>
@tmorehouse
Copy link
Member

tmorehouse commented Oct 8, 2017

This works in the current version (paste it into the playground to see)

<b-nav pills>
  <b-nav-item active>Active</b-nav-item>
  <b-nav-item>Link</b-nav-item>
  <b-nav-item-dropdown text="Dropdown" right>
    <b-dropdown-item>one</b-dropdown-item>
    <b-dropdown-item>two</b-dropdown-item>
    <b-dropdown-divider></b-dropdown-divider>
    <b-dropdown-item>three</b-dropdown-item>
  </b-nav-item-dropdown>
  <b-nav-item-dropdown text="Dropup" dropup right>
    <b-dropdown-item>one</b-dropdown-item>
    <b-dropdown-item>two</b-dropdown-item>
    <b-dropdown-divider></b-dropdown-divider>
    <b-dropdown-item>three</b-dropdown-item>
  </b-nav-item-dropdown>
</b-nav>

You are also specifying your title incorrectly. It should be set via the prop text on or via the named slotbutton-content`

Make sure you are using the latest Bootstrap-Vue (v1.0.0-beta.9) and that you are including bootstrap V4.beta CSS

@gildas
Copy link
Author

gildas commented Oct 9, 2017

Ok, maybe I am doing something very wrong.

Just tried this in the playground (and it does not work either):

<b-navbar toggleable fixed="bottom">
  <b-nav is-nav-bar>
    <b-nav-item>
      <b-nar-text>v. 1.0.0</b-nar-text>
    </b-nav-item>
  </b-nav>
  <b-nav is-nav-bar class="ml-auto">
    <b-nav-item-dropdown text="Choice 1" dropup right>
      <b-dropdown-item>Choice 1</b-dropdown-item>
      <b-dropdown-item>Choice 2</b-dropdown-item>
      <b-dropdown-item>Choice 3</b-dropdown-item>
      <b-dropdown-item>Choice 4</b-dropdown-item>
    </b-nav-item-dropdown>
  </b-nav>
</b-navbar>

It would have been nice to wait for my confirmation before closing this...

@tmorehouse
Copy link
Member

tmorehouse commented Oct 9, 2017

b-nav supports dropup, but b-navbar does not support dropup (only dropdown), as per the official Bootstrap V4.beta.1 CSS

It is not controlled by Bootstrap-Vue, but rather Bootstrap V4.beta CSS

twbs/bootstrap#23429
twbs/bootstrap#23520

It is expected that this will be addressed when Bootstrap V4.beta.2 ships, but only when the navbar is fixed bottom.

In your original post, you did not mention being in a navbar at all.

@gildas
Copy link
Author

gildas commented Oct 9, 2017

Ok, noted. Thanks a lot Troy for checking.
And sorry to be a pain. I should have given you better details.

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

No branches or pull requests

2 participants