From e916c9033b497235ebb07e512e41f33dd6baac8b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 28 Nov 2025 10:03:45 +0100 Subject: [PATCH] Bug 41328: Fix incorrect use of ref in KohaTable.vue This patch fixes DataTables instantiation in Vue components. There was an error in the console Uncaught (in promise) TypeError: table.value.dt is not a function --- .../intranet-tmpl/prog/js/vue/components/KohaTable.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue index 6ce067b8e46..d02e438baf4 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue @@ -101,10 +101,10 @@ export default { }); const redraw = url => { - table.value.dt().ajax.url(url).draw(); + table.value.dt.ajax.url(url).draw(); }; const useTableObject = () => { - let dt = table.value.dt(); + let dt = table.value.dt; return dt; }; @@ -225,7 +225,7 @@ export default { }); onMounted(() => { - let dt = table.value.dt(); + let dt = table.value.dt; let table_node = dt.table().node(); let add_filters = props.add_filters; let filters_options = props.filters_options; @@ -276,7 +276,7 @@ export default { }); onBeforeUnmount(() => { - const dt = table.value.dt(); + const dt = table.value.dt; dt.destroy(); }); return { -- 2.43.0