From 08cc69465c15d4a1d4ec80dc9482038d42ba9731 Mon Sep 17 00:00:00 2001 From: "Grigorii K. Shartsev" Date: Wed, 31 Jan 2024 18:46:47 +0100 Subject: [PATCH] revert: fix(NcActions): use new slots api - $scopedSlots cannot be used in beforeUpdated. On re-rendering, when vnode is reused, on beforeUpdated $scopedSlots returns an old value and breaks rendering. - Officially, $slots/$scopedSlots should be used only during the rendering - This commit returns $slots to have an old behavior and resolve regression - TODO: find better soluton to support both slots API Reverts commit b94ff0438c47f8005b8e5c5da9b6b045d7733267 Signed-off-by: Grigorii K. Shartsev --- src/mixins/actionGlobal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mixins/actionGlobal.js b/src/mixins/actionGlobal.js index 86351996ab..80d8e7afb8 100644 --- a/src/mixins/actionGlobal.js +++ b/src/mixins/actionGlobal.js @@ -40,7 +40,7 @@ export default { methods: { getText() { - return this.$scopedSlots.default ? this.$scopedSlots.default()?.[0].text.trim() : '' + return this.$slots.default ? this.$slots.default[0].text.trim() : '' }, }, }