Skip to main content

All Questions

0 votes
3 answers
215 views

How to pass component as props in vue 3 composition api?

i want to pass props customActionComponent as component and need to render in child component FlightDetail.vue <template> <ComponentCard title="Flight Details" subtitle=&...
Juned Khorajiya's user avatar
1 vote
0 answers
21 views

Passing object with reactive properties as a prop triggers child component onUpdated hook when updating parent component state

Consider a simple component Comp.vue file that only logs a message in the console when updated: // Comp.vue <script setup> import { onUpdated } from 'vue' onUpdated(() => { console....
8ctavio's user avatar
  • 11
0 votes
0 answers
409 views

How to pass props in Quasar 2 Vue 3 Composition API table?

I'm trying to make a custom child component with props as a row data, but have the error "rows.slice is not a function", as I inspect the parent data is an Object, and the props received are ...
bob's user avatar
  • 33
-1 votes
2 answers
44 views

Props not rendering in child component

I am trying to pass an error message to child component but it is not rendering it. Hard coded message is displayed only. enter image description hereenter image description hereenter image ...
Anupam Kumar's user avatar
3 votes
2 answers
1k views

Default props in Vue 3 composition api are undefined (TS)

If I don't pass a value, the prop is just undefined, instead of taking the default value. For example switchView and activeView. I have defined the props like this: interface Props { config: { ...
Bushima's user avatar
  • 107
0 votes
2 answers
991 views

What is the best practice to pass null to a required props in component in vuejs?

Stack: vuejs (3.2) + composition API + Typescript + Visual studio code file type.ts: export class GeographicCoordinate { latitude: number; longitude: number; altitude?: number; constructor(...
timewalker's user avatar
1 vote
1 answer
1k views

Why vue.js type check for props failed even I use "Object as PropType<GeographicCoordinate | null>"?

Context: vue.js (^3.2.13) + Typescript + Composition API + visual studio code file type.ts: export class GeographicCoordinate { latitude: number; longitude: number; altitude?: number; ...
timewalker's user avatar
1 vote
1 answer
1k views

Vue3 shared props between components

I've recently switched from Vue2 to Vue3 but I'm sort of confused to what the best practice is to shared props between multiple components. I want to make input components which share the common props ...
Reflexecute's user avatar
0 votes
1 answer
28 views

Problems with passing event from child component. Vue 3

The item is not removed from list. Although I am passing the red to the event via emit(). parent ... <b-list-group-item class="d-flex align-items-center justify-content-...
Rim Khairullin's user avatar
2 votes
1 answer
182 views

Apply props default values based on inferred type

How to apply different default values to components props when using union type-based declarations? <script setup lang="ts"> import { defineProps, withDefaults } from 'vue'; ...
user avatar
1 vote
1 answer
607 views

Vue reactivity with composition API clone props

I have a component that is getting props from a parent. Now I really want to only clone the props - I don't want the changes to be reflected in the parent as well. <template> <input-text v-...
George Morris's user avatar
1 vote
1 answer
659 views

How to use stores and props in onMounted Vue

I'm new in Vue Composition API and some functions as defineProps are not available. So, I have a following problem: from parent component I've got props and want to store in "Pinia" storage ...
Alex Dalen's user avatar
5 votes
1 answer
775 views

How to create a dynamic background image for components in Vue using props?

Objective I want to pass the path of an image as a prop to a component. I want the component to use the prop to dynamically generate the background image. All my images in an assets folder in the Vue ...
Jeremy Kung's user avatar
0 votes
1 answer
1k views

Vue 3 - Render component from string

I have a question. I have a component called ValidateCheckboxes. ValidateCheckboxes is a validated list of checkboxes. I pass checkboxes to this component by props. It look like that: enter image ...
matik525's user avatar
1 vote
1 answer
286 views

using props to show child component

i want to show my child component, but it give me error in browser [Vue warn]: Property "modules" was accessed during render but is not defined on instance. i have parent component that i ...
cahya faisal reza's user avatar

15 30 50 per page