From ac7c04d9d87e674501385f94f83de20d8ff22e98 Mon Sep 17 00:00:00 2001 From: LittleLama Date: Wed, 18 Oct 2023 13:01:14 +0200 Subject: [PATCH] Added init trigger if no initComplete option is passed If initComplete option is passed, parent compenent has the power to catch init from the callback so the lack of trigger is solved. --- src/datatables.net-vue.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/datatables.net-vue.vue b/src/datatables.net-vue.vue index d9280a2..a878a3e 100644 --- a/src/datatables.net-vue.vue +++ b/src/datatables.net-vue.vue @@ -86,6 +86,11 @@ watch( onMounted(() => { const inst = getCurrentInstance(); let options: any = props.options || {}; + if(!Object.prototype.hasOwnProperty.call(options,"initComplete")){ + options.initComplete = ()=>{ + this.$emit("init"); + }; + } if (props.data) { options.data = props.data;