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

[stable4] Stop filtering Actions in $slots #2254

Merged
merged 2 commits into from
Sep 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions src/components/Actions/Actions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,25 +225,9 @@ 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'

// 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'

/**
Expand Down Expand Up @@ -484,9 +468,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
Expand All @@ -497,7 +478,6 @@ export default {
// and the array is now reactive
// init actions
this.initActions()
ValidateSlot(this.$slots.default, allowedChildren, this)
},

methods: {
Expand Down