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

Component inside VaModal cannot be assigned ref #4407

Open
beard7 opened this issue Oct 23, 2024 · 1 comment
Open

Component inside VaModal cannot be assigned ref #4407

beard7 opened this issue Oct 23, 2024 · 1 comment
Labels
BUG Something isn't working

Comments

@beard7
Copy link

beard7 commented Oct 23, 2024

Vuestic-ui version: 1.10.3

Description

I'm trying to make some components (usually data tables) that can be optionally displayed in a modal. No problem so far... just wrap the VaModal around the component.

However, the component exposes one or mire functions that need to be called by the parent. This is where the problem starts. Assigning a ref to a component inside VaModal is always undefined, so the exposed functions can't be called.

Reproduction

<template>
  <VaModal v-model="showModal">
    <component ref="myComponent" :some-prop="true">
  </VaModal>
</template>

<script setup>
import ...

const myComponent = ref(null);

myComponent.value.exposedFunction() // error myComponent.value is undefined

Any ideas?

@beard7 beard7 added the BUG Something isn't working label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

2 participants