Skip to content
Permalink
Browse files
feat(b-nav-item-dropdown): add boundary prop, applicable when not i…
…n `b-navbar` (closes #4684) (#4691)

* feat(b-nav-item-dropdown): add boundary prop (used when not in b-navbar)

* Update dropdown.js

* Update dropdown.js

* Update package.json

Co-authored-by: Jacob Müller <jacob.mueller.elz@gmail.com>
  • Loading branch information
tmorehouse and jacobmllr95 committed Jan 29, 2020
1 parent dba2beb commit 3a50ad85e85e1c6dc55a36665062180687078708
Showing with 12 additions and 7 deletions.
  1. +0 −7 src/components/dropdown/dropdown.js
  2. +5 −0 src/components/nav/package.json
  3. +7 −0 src/mixins/dropdown.js
@@ -2,7 +2,6 @@ import Vue from '../../utils/vue'
import { arrayIncludes } from '../../utils/array'
import { stripTags } from '../../utils/html'
import { getComponentConfig } from '../../utils/config'
import { HTMLElement } from '../../utils/safe-types'
import idMixin from '../../mixins/id'
import dropdownMixin from '../../mixins/dropdown'
import normalizeSlotMixin from '../../mixins/normalize-slot'
@@ -72,12 +71,6 @@ export const props = {
role: {
type: String,
default: 'menu'
},
boundary: {
// String: `scrollParent`, `window` or `viewport`
// HTMLElement: HTML Element reference
type: [String, HTMLElement],
default: 'scrollParent'
}
}

@@ -143,6 +143,11 @@
{
"prop": "noCaret",
"description": "Hide the caret indicator on the toggle button"
},
{
"prop": "boundary",
"version": "2.4.0",
"description": "The boundary constraint of the menu: 'scrollParent', 'window', 'viewport', or a reference to an HTMLElement. Has no effect when dropdown is inside a b-navbar"
}
],
"slots": [
@@ -4,6 +4,7 @@ import { BvEvent } from '../utils/bv-event.class'
import { closest, contains, isVisible, requestAF, selectAll } from '../utils/dom'
import { hasTouchSupport } from '../utils/env'
import { isNull } from '../utils/inspect'
import { HTMLElement } from '../utils/safe-types'
import { warn } from '../utils/warn'
import clickOutMixin from './click-out'
import focusInMixin from './focus-in'
@@ -108,6 +109,12 @@ export default {
popperOpts: {
// type: Object,
default: () => {}
},
boundary: {
// String: `scrollParent`, `window` or `viewport`
// HTMLElement: HTML Element reference
type: [String, HTMLElement],
default: 'scrollParent'
}
},
data() {

2 comments on commit 3a50ad8

@bagaskarala
Copy link

@bagaskarala bagaskarala commented on 3a50ad8 Feb 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dropdown

I'm update to 2.4.0 and got this broke dropdown. Im not using b-navbar. I've set boundary to viewport, windows but nothing works

Note: Dropdown button is the bell icon. Navbar not using b-navbar

@tmorehouse
Copy link
Member Author

@tmorehouse tmorehouse commented on 3a50ad8 Feb 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bagaskarala could you create a new issue with a minimal reproduction of the issue? you can use hte docs playground to export to JsFiddle, Codepen or CodeSandbox.

Please sign in to comment.