From c5b6ff89167d2802e3c4175c1908b01b5b2315b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Thu, 16 Sep 2021 12:12:39 +0200 Subject: [PATCH 1/2] Stop filtering Actions in $slots MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- src/components/Actions/Actions.vue | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/components/Actions/Actions.vue b/src/components/Actions/Actions.vue index e27bb1849e..0b2ba7ee47 100644 --- a/src/components/Actions/Actions.vue +++ b/src/components/Actions/Actions.vue @@ -225,7 +225,6 @@ import DotsHorizontal from 'vue-material-design-icons/DotsHorizontal' import Tooltip from '../../directives/Tooltip' import GenRandomId from '../../utils/GenRandomId' -import ValidateSlot from '../../utils/ValidateSlot' import { t } from '../../l10n' import Popover from '../Popover' @@ -484,9 +483,6 @@ export default { beforeMount() { // init actions this.initActions() - - // filter invalid menu items - ValidateSlot(this.$slots.default, allowedChildren, this) }, beforeUpdate() { // ! since we're using $slots to manage our actions @@ -497,7 +493,6 @@ export default { // and the array is now reactive // init actions this.initActions() - ValidateSlot(this.$slots.default, allowedChildren, this) }, methods: { From af6dddf55aee084f880505849fe49f630d0c6896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Thu, 16 Sep 2021 12:35:02 +0200 Subject: [PATCH 2/2] Remove allowedChildren --- src/components/Actions/Actions.vue | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/components/Actions/Actions.vue b/src/components/Actions/Actions.vue index 0b2ba7ee47..3b305abc56 100644 --- a/src/components/Actions/Actions.vue +++ b/src/components/Actions/Actions.vue @@ -228,21 +228,6 @@ import GenRandomId from '../../utils/GenRandomId' import { t } from '../../l10n' import Popover from '../Popover' -// This is the list of ALL the ALLOWED components -// in the default SLOT -const allowedChildren = [ - 'ActionButton', - 'ActionCheckbox', - 'ActionInput', - 'ActionLink', - 'ActionRadio', - 'ActionRouter', - 'ActionSeparator', - 'ActionText', - 'ActionTextEditable', - 'ActionCaption', -] - const focusableSelector = '.focusable' /**