mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-03 01:37:09 +00:00
fix(nc-gui): set eventList when the hook is ready
This commit is contained in:
@@ -175,18 +175,7 @@ const formInput = ref({
|
||||
],
|
||||
})
|
||||
|
||||
const eventList = [
|
||||
{ text: ['After', 'Insert'], value: ['after', 'insert'] },
|
||||
{ text: ['After', 'Update'], value: ['after', 'update'] },
|
||||
{ text: ['After', 'Delete'], value: ['after', 'delete'] },
|
||||
...(hook.version === 'v2'
|
||||
? [
|
||||
{ text: ['After', 'Bulk Insert'], value: ['after', 'bulkInsert'] },
|
||||
{ text: ['After', 'Bulk Update'], value: ['after', 'bulkUpdate'] },
|
||||
{ text: ['After', 'Bulk Delete'], value: ['after', 'bulkDelete'] },
|
||||
]
|
||||
: []),
|
||||
]
|
||||
const eventList = ref<Record<string, any>[]>([])
|
||||
|
||||
const notificationList = computed(() => {
|
||||
return appInfo.isCloud
|
||||
@@ -283,6 +272,19 @@ function setHook(newHook: HookType) {
|
||||
if (hook.version === 'v1') {
|
||||
urlTabKey.value = 'body'
|
||||
}
|
||||
|
||||
eventList.value = [
|
||||
{ text: ['After', 'Insert'], value: ['after', 'insert'] },
|
||||
{ text: ['After', 'Update'], value: ['after', 'update'] },
|
||||
{ text: ['After', 'Delete'], value: ['after', 'delete'] },
|
||||
...(hook.version === 'v2'
|
||||
? [
|
||||
{ text: ['After', 'Bulk Insert'], value: ['after', 'bulkInsert'] },
|
||||
{ text: ['After', 'Bulk Update'], value: ['after', 'bulkUpdate'] },
|
||||
{ text: ['After', 'Bulk Delete'], value: ['after', 'bulkDelete'] },
|
||||
]
|
||||
: []),
|
||||
]
|
||||
}
|
||||
|
||||
async function onEventChange() {
|
||||
@@ -763,4 +765,4 @@ onMounted(async () => {
|
||||
<LazyWebhookCallLog :hook="hook" />
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</template>
|
||||
</template>
|
||||
Reference in New Issue
Block a user