Files
Tsering Paljor c95046c2f9 feat: Add Automation recipes for For and While loops (#6338)
* Add recipies for For and While loops

* Add tests

* Add changelog

* Fix the clean-up when rolling back
2026-10-16 08:57:23 +04:00

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>