fix: slot not updating with v-slot #1026
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #1025 #936
When using the slot syntax slot="name" beofreUpdate is able to identify whether or not a slot exists. However when switching to the new syntax v-slot:name only the default slot appears in this.$slots. This PR moves the check for slot content to the updated lifecycle method which works for both old and newer syntax.
Changelog
M packages/core/src/components/cv-combo-box/cv-combo-box.vue
M packages/core/src/components/cv-data-table/_cv-data-table-row-inner.vue
M packages/core/src/components/cv-data-table/cv-data-table-row.vue
M packages/core/src/components/cv-data-table/cv-data-table-skeleton.vue
M packages/core/src/components/cv-data-table/cv-data-table.vue
M packages/core/src/components/cv-date-picker/cv-date-picker.vue
M packages/core/src/components/cv-dropdown/cv-dropdown.vue
M packages/core/src/components/cv-modal/cv-modal.vue
M packages/core/src/components/cv-multi-select/cv-multi-select.vue
M packages/core/src/components/cv-number-input/cv-number-input.vue
M packages/core/src/components/cv-select/cv-select.vue
M packages/core/src/components/cv-text-area/cv-text-area.vue
M packages/core/src/components/cv-text-input/cv-text-input.vue
M packages/core/src/components/cv-time-picker/cv-time-picker.vue
M packages/core/src/components/cv-ui-shell/cv-header.vue
M packages/core/src/components/cv-ui-shell/cv-side-nav-link.vue
M packages/core/src/components/cv-ui-shell/cv-side-nav-menu.vue
M storybook/stories/cv-ui-shell-story.js