Skip to content

Commit

Permalink
Revert "feat: Close nested popups without closing parent(s)"
Browse files Browse the repository at this point in the history
This reverts commit 1329cfb
  • Loading branch information
fabkho committed Sep 12, 2024
1 parent 94680fd commit be12837
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 77 deletions.
7 changes: 0 additions & 7 deletions demo/src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ export const demos = [
label: 'Dropdown 2',
},
},
{
path: '/component/demo3',
component: () => import('./views/component/DropdownDemo3.vue'),
meta: {
label: 'Dropdown 3',
},
},
{
path: '/component/submenu1',
component: () => import('./views/component/SubMenuDemo1.vue'),
Expand Down
48 changes: 0 additions & 48 deletions demo/src/views/component/DropdownDemo3.vue

This file was deleted.

8 changes: 0 additions & 8 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -483,14 +483,6 @@ Boolean: disable the auto focus on the popper DOM node when shown.

Id used for the `aria-describedby` attribute. By default a random id.

### `hideParents`

Boolean: disable the auto closing of parent popups when nested.

```html
<VDropdown v-bind:hideParents="true" />
```

## Component slots

### `default`
Expand Down
2 changes: 0 additions & 2 deletions docs/guide/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ export const config: FloatingVueConfig = {
handleResize: true,
// Hide on click outside
autoHide: true,
// Close full chain of parents
hideParents: true,
},
menu: {
$extend: 'dropdown',
Expand Down
8 changes: 0 additions & 8 deletions packages/floating-vue/src/components/Popper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,6 @@ const createPopper = () => defineComponent({
default: defaultPropFactory('autoHide'),
},

hideParents: {
type: Boolean,
default: defaultPropFactory('hideParents'),
},

handleResize: {
type: Boolean,
default: defaultPropFactory('handleResize'),
Expand Down Expand Up @@ -1094,7 +1089,6 @@ function handleGlobalClose (event: PopperEvent, touch: boolean) {

for (let i = shownPoppers.length - 1; i >= 0; i--) {
const popper = shownPoppers[i]

try {
const contains = popper.containsGlobalTarget = popper.mouseDownContains || popper.popperNode().contains(event.target)
popper.pendingHide = false
Expand All @@ -1118,8 +1112,6 @@ function handleGlobalClose (event: PopperEvent, touch: boolean) {
}

// Auto hide parents
if (!popper.hideParents) return

let parent = popper.parentPopper as PopperInstance
while (parent) {
if (shouldAutoHide(parent, parent.containsGlobalTarget, event)) {
Expand Down
4 changes: 0 additions & 4 deletions packages/floating-vue/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ export const config: FloatingVueConfig = {
* By default, compute autohide on 'click'.
*/
autoHideOnMousedown: false,
// By default, hide parents on close
hideParents: true,
// Themes
themes: {
tooltip: {
Expand Down Expand Up @@ -69,8 +67,6 @@ export const config: FloatingVueConfig = {
handleResize: true,
// Hide on clock outside
autoHide: true,
// By default, hide parents on close
hideParents: true,
},
menu: {
$extend: 'dropdown',
Expand Down

0 comments on commit be12837

Please sign in to comment.