Follow-up from "fix(Dropdown): Fix disclosure dropdown a11y issues"
Several GitLab UI components assume that the default scope can be accessed from the $scopedSlots
property. Based on the findings on !4160 (merged), this assumption can cause problems when using Vue 3. Let's create an utility to abstract the Vue version differences and use this utility in
- https://gitlab.com/gitlab-org/gitlab-ui/-/blob/main/src/components/base/daterange_picker/daterange_picker.vue#L189
- https://gitlab.com/gitlab-org/gitlab-ui/-/blob/main/src/components/base/new_dropdowns/disclosure/disclosure_dropdown_item.vue#L27
The following discussion from !4160 (merged) should be addressed:
-
@ealcantara started a discussion: (+3 comments) vue In Vue 3, the default slot doesn't exist in the
$scopedSlots
property, we should access it via$slots