-
Notifications
You must be signed in to change notification settings - Fork 85
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
revert: fix(NcActions): use new slots api #5196
Conversation
- $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]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5196 +/- ##
=======================================
Coverage 39.34% 39.34%
=======================================
Files 139 139
Lines 3688 3688
Branches 810 810
=======================================
Hits 1451 1451
Misses 2021 2021
Partials 216 216 ☔ View full report in Codecov by Sentry. |
Also breaking Forms 🙈 |
This also feels more natural to me, but not sure we can refactor like this. At least not non-breaking I guess. |
We can make An alternative could be a renderless component to cache a value during the rendering. This will work, but could be even less performant with an additional component instance =D |
Thanks for the quick fix @ShGKme |
Sorry for the regression 🙈 |
☑️ Resolves
$scopedSlots
cannot be used inbeforeUpdated
hook.vnode
is reused, on beforeUpdated state$scopedSlots
still returns an old value and breaks rendering.$slots/$scopedSlots
should be used only during the rendering and not supposed to be used indata
,computed
or life cycle hooks.This commit returns
$slots
to have an old behavior and resolve a regressionTODO: find a better solution to support both slots API. Use method in template and always call it, like we do in Vue 3?
🏁 Checklist