mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 16:28:31 +00:00
* Add recipies for For and While loops * Add tests * Add changelog * Fix the clean-up when rolling back
55 lines
1.1 KiB
Vue
55 lines
1.1 KiB
Vue
<template>
|
|
<Context
|
|
ref="context"
|
|
class="workflow-node__context"
|
|
max-height-if-outside-viewport
|
|
@shown="focusMenu"
|
|
>
|
|
<WorkflowAddNodeMenu
|
|
ref="menu"
|
|
:node="node"
|
|
:only-trigger="onlyTrigger"
|
|
@change="onChange($event)"
|
|
@recipe="onRecipe($event)"
|
|
@close="hide"
|
|
></WorkflowAddNodeMenu>
|
|
</Context>
|
|
</template>
|
|
|
|
<script>
|
|
import context from '@baserow/modules/core/mixins/context'
|
|
import WorkflowAddNodeMenu from './WorkflowAddNodeMenu.vue'
|
|
export default {
|
|
name: 'WorkflowNodeContext',
|
|
components: { WorkflowAddNodeMenu },
|
|
mixins: [context],
|
|
props: {
|
|
node: {
|
|
type: Object,
|
|
required: false,
|
|
default: () => null,
|
|
},
|
|
onlyTrigger: {
|
|
type: Boolean,
|
|
required: false,
|
|
default: () => false,
|
|
},
|
|
},
|
|
emits: ['change', 'recipe'],
|
|
methods: {
|
|
async focusMenu() {
|
|
await this.$nextTick()
|
|
await this.$refs.menu?.focus()
|
|
},
|
|
onChange(nodeType) {
|
|
this.hide()
|
|
this.$emit('change', nodeType)
|
|
},
|
|
onRecipe(recipeType) {
|
|
this.hide()
|
|
this.$emit('recipe', recipeType)
|
|
},
|
|
},
|
|
}
|
|
</script>
|