-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get rid of NoElement component and useNoElementRender composable #1583
Conversation
…avour of render functions
…Element component in favour of NoAnimation component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 NoElement 🔥
packages/x-components/src/x-modules/extra-params/components/renderless-extra-param.vue
Outdated
Show resolved
Hide resolved
packages/x-components/src/components/animations/no-animation.vue
Outdated
Show resolved
Hide resolved
the component itself. It is the alternative for the NoElement antipattern. */ | ||
const innerProps = { closeModal }; | ||
return ( | ||
slots.closingElement ? () => slots.closingElement?.(innerProps)[0] : innerProps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously we were using the slot name as kebab case and I think we should keep doing the same here to not introduce an additional breaking change. So I'd refactor it to slots['closing-element']
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could have sworn I tried it in kebab-case but for some reason/error, I finally chose this way.
Now, I have tried in kebab-case and everything works, so consider it refactored together with openingElement
.
…o get-rid-of-no-element-component
v-bind="$attrs"
andinheritAttrs: false
in components when it is not the root nodeNoElement
component anduseNoElementRender
composable in favour of Vue3 way for inheritance. No longer available to use them in components or templates.NoAnimation
as alternative forNoElement
with the aim of using it as default value inanimation
props.Note: With this PR, no more warnings pending, except 2 from
xBus
frominfiniteScroll
directive fixed here #1584