Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

226
Views
Vue bind child component data from parent

I need to bind my child component data (inputData) from parent component but it's not working i cannot find where is my mistake

app.js

let vm = new Vue({
    el: "#app",
    components: {
        'modal-panel': modal,
        'rich-select': richSelect,
        'file-upload': uploader,
    },
    data(){ return {
        isModalActive: false,
        inputData: null
    }} ,
    methods: {
        toggleModal(){
            this.isModalActive = !this.isModalActive
        },
        modalData(){
            this.inputData = 'Example Data'
        }
    }
});

Modal.vue

<template>
  <input type="text" :value="inputData" >
</template>



export default {
    name: 'modal',
    props: ['inputData'],
    mounted(){
        console.log('modal Mounted')
    }
};

inside my blade i'am calling modal component like this

<div class="container"  id="app">    
  <modal-panel v-if="isModalActive" @close="toggleModal" :inputData="inputData"></modal-panel>
</div>

when i test that code all methods are working but inside Modal.vue input still not binding

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You've to use the prop with kebab-case format as follows :

<modal-panel v-if="isModalActive" @close="toggleModal" :input-data="inputData"></modal-panel>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!