Skip to content

Commit

Permalink
revert: fix(NcActions): use new slots api
Browse files Browse the repository at this point in the history
- $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 b94ff04

Signed-off-by: Grigorii K. Shartsev <[email protected]>
  • Loading branch information
ShGKme committed Jan 31, 2024
1 parent 83d844d commit 08cc694
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mixins/actionGlobal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() : ''
},
},
}

0 comments on commit 08cc694

Please sign in to comment.