[NcActions] doesn't support non-direct NcAction* usage #5171
Labels
1. to develop
Accepted and waiting to be taken care of
feature: actions
Related to the actions components
The problem is that in
NcActions
we manually take actions from slot in render function.And some parts check, what exactly action do we have.
For example, here (1)
nextcloud-vue/src/components/NcActions/NcActions.vue
Lines 1058 to 1060 in 0b1bf86
and here (2)
nextcloud-vue/src/components/NcActions/NcActions.vue
Lines 1321 to 1327 in 0b1bf86
Because as an action name we take vnode's component instance's name:
nextcloud-vue/src/components/NcActions/NcActions.vue
Lines 1047 to 1049 in 0b1bf86
For
MyActionWrapper
it will beMyActionWrapper
even if it renders<NcActionButton>
.While (1) only results in broken
inline
feature, (2) now breaks a whole<NcActions>
when we use custom wrappers.The complex part here is that in Vue when a parent is being rendered, it has no child yet. So we cannot just make recursive
getActionName
. So during NcActions rendering we have no idea what childMyActionWrapper
way actually be.The text was updated successfully, but these errors were encountered: