Skip to content
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

fix(NcActions): use new slots api #5118

Merged
merged 1 commit into from Jan 23, 2024

Conversation

ShGKme
Copy link
Contributor

@ShGKme ShGKme commented Jan 23, 2024

☑️ Resolves

  • Since Vue 2.6 with new slots api, it is guaranteed that $scopedSlots has render function for all slots passed any way, while $slots only has value when using deprecated API or short-hand syntax
  • It also closer to Vue 3 API
  • before method is removed, there is no such lifecycle hook

It allows dynamically defining text content of the component in template without the need to rewrite the component to render-function.

See: https://v2.vuejs.org/v2/api/#vm-scopedSlots

🖼️ Screenshots

When using non-deprecated slots api:

🏚️ Before 🏡 After
image image

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable

@ShGKme ShGKme added bug Something isn't working 3. to review Waiting for reviews feature: actions Related to the actions components labels Jan 23, 2024
@ShGKme ShGKme self-assigned this Jan 23, 2024
@ShGKme ShGKme force-pushed the fix/nc-actions--support-new-slots-api branch from 089be7c to 49d4233 Compare January 23, 2024 13:14
@ShGKme ShGKme added this to the 8.5.0 milestone Jan 23, 2024
- Since Vue 2.6 with new slots api, it is guaranteed that $scopedSlots has render function
  for all slots passed any way, while $slots only has value when using deprecated API or short-hand syntax
- It also closer to Vue 3 API
- `before` method is removed, there is no such lifecycle hook

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme ShGKme force-pushed the fix/nc-actions--support-new-slots-api branch from 49d4233 to b94ff04 Compare January 23, 2024 13:16
@susnux susnux merged commit d244701 into master Jan 23, 2024
15 checks passed
@susnux susnux deleted the fix/nc-actions--support-new-slots-api branch January 23, 2024 14:40
@Pytal Pytal mentioned this pull request Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working feature: actions Related to the actions components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants