diff --git a/packages/nc-gui-v2/components/webhook/Drawer.vue b/packages/nc-gui-v2/components/webhook/Drawer.vue index bd14e77d70..2c8462810d 100644 --- a/packages/nc-gui-v2/components/webhook/Drawer.vue +++ b/packages/nc-gui-v2/components/webhook/Drawer.vue @@ -8,24 +8,29 @@ const emit = defineEmits(['update:modelValue']) const editOrAdd = ref(false) +const webhookEditorRef = ref() + const dialogShow = computed({ get() { return modelValue }, - set(v) { + set(v: boolean) { emit('update:modelValue', v) }, }) -function editHook(hook: Record) { +async function editHook(hook: Record) { editOrAdd.value = true - // TODO: update editor ref hook + nextTick(async () => { + webhookEditorRef.value.hook = { ...hook } + await webhookEditorRef.value.onEventChange() + }) }