Skip to content

fix: App Context missing in slots #1094

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

Merged
merged 1 commit into from
Mar 15, 2025

Conversation

chocolateimage
Copy link
Contributor

Describe your changes

When using slots like this example:

<script setup>
import { Select } from 'primevue'
import VueDatePicker from '@vuepic/vue-datepicker'
import '@vuepic/vue-datepicker/dist/main.css'

const date = ref()
</script>

<template>
    <VueDatePicker v-model="date">
        <template #left-sidebar>
            <Select />
        </template>
    </VueDatePicker>
</template>

The <Select> component would not get passed the appContext while shadow rendering which causes errors, especially on libraries like PrimeVue which require the appContext to use config properties.

Setting appContext after calling h() is what is described by Evan You: vuejs/core#2097 (comment)

Issue ticket number and link

#1092

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have ensured that unit tests pass without errors
  • If it is a new feature, I have added a new unit test

Setting appContext after calling h() is what is described by Evan You:
vuejs/core#2097 (comment)
@Jasenkoo Jasenkoo merged commit 6a9754c into Vuepic:main Mar 15, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants