Vue send data from modal child to parent methodDisallow Twitter Bootstrap modal window from closingHow to hide Bootstrap modal with javascript?Prevent Bootstrap Modal from disappearing when clicking outside or pressing escape?Parent/Child methods in Vue JSvuejs update parent data from child componentModifying child data from parent vueHow to pass data from child to parent in vuebuefy Programmatic modal get data in parent from childVue - Child selection triggers parent methodVue.js parent don't send updated data to child

To find islands of 1 and 0 in matrix

Did Vladimir Lenin have a cat?

ECDSA: Why is SigningKey shorter than VerifyingKey

How can Paypal know my card is being used in another account?

What would the United Kingdom's "optimal" Brexit deal look like?

Why is it "on the inside" and not "in the inside"?

Does Dispel Magic destroy Artificer Turrets?

Sci-fi change: Too much or Not enough

What is more environmentally friendly? An A320 or a car?

If you inherit a Roth 401(k), is it taxed?

Is there a wealth gap in Boston where the median net worth of white households is $247,500 while the median net worth for black families was $8?

Rampant sharing of authorship among colleagues in the name of "collaboration". Is not taking part in it a death knell for a future in academia?

Self-deportation of American Citizens from US

How to store my pliers and wire cutters on my desk?

What are the cons of stateless password generators?

Anti-cheating: should there be a limit to a number of toilet breaks per game per player?

Why do they sell Cat 5 Ethernet splitters if you can’t split the signal?

Should I intervene when a colleague in a different department makes students run laps as part of their grade?

How long until two planets become one?

Why force the nose of 737 Max down in the first place?

What is the most efficient way to write 'for' loops in Matlab?

Why is the Apollo LEM ladder so far from the ground?

How to efficiently shred a lot of cabbage?

Compound Word Neologism



Vue send data from modal child to parent method


Disallow Twitter Bootstrap modal window from closingHow to hide Bootstrap modal with javascript?Prevent Bootstrap Modal from disappearing when clicking outside or pressing escape?Parent/Child methods in Vue JSvuejs update parent data from child componentModifying child data from parent vueHow to pass data from child to parent in vuebuefy Programmatic modal get data in parent from childVue - Child selection triggers parent methodVue.js parent don't send updated data to child






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















i need help to send v-model from modal child to parent method.



This is the modal with vmodel tplProperty.



<template>
<mdb-modal centered v-if="characteristicsModal">
<mdb-modal-header>
<mdb-modal-title>Neue Gruppe anlegen</mdb-modal-title>
</mdb-modal-header>
<mdb-modal-body>
<div style="padding-left: 20px;">Eigenschaftname für currentSelectedGroup
<input type="text" style="width: 90%;" v-model="tplProperty" name="tplProperty"></div>
</mdb-modal-body>
<mdb-modal-footer>
<mdb-btn color="success" @click.native="saveProperty">Speichern</mdb-btn>
</mdb-modal-footer>
</mdb-modal>
</template>
<script>
export default
name: 'AddCharacteristicsModal',
components:

,
props:
currentSelectedGroup: '',
,
data()
return
tplProperty:''


methods:

saveProperty()
this.$emit('saveProperty', this.tplProperty);
,


</script>


This is the parent:



<AddCharacteristicsModal 
@saveProperty="saveProperty" v-bind:currentSelectedGroup="currentSelectedGroup" />



In data():



tplProperty: '',


And parent method:



 saveProperty(selectedGroup) 

var self = this;
// var selectedGroupKey = selectedGroup.toLowerCase().replace(/s/g, '').replace(/[^a-zA-Z0-9]/g, '');
console.log("******SAVEPROP"+ selectedGroup);
if(this.properties[selectedGroup] == undefined)
this.properties[selectedGroup]=[self.tplProperty];
else
Object.keys(this.properties).forEach(function (key)
if(key == selectedGroup)
var mergeList = self.properties[key].concat([self.tplProperty]);
//console.log('mergeList:'+JSON.stringify(mergeList));
self.properties[key] = mergeList;

);

this.currentSelectedGroup = selectedGroup;
this.tplProperty ='';

this.templates[this.selectedTemplate].property = this.properties;

console.log("hallo");

//console.log("P::"+JSON.stringify(this.properties));
//console.log("P:TZTZTZ:"+JSON.stringify(this.templates[this.selectedTemplate].groups));

// this.allTemplate[this.selectedTemplate] = this.templates;
//localStorage.removeItem("allTemplates");
//localStorage.setItem('allTemplates', JSON.stringify(this.allTemplate));
// console.log("jijiji:"+JSON.stringify(this.templates));
,


The child v-model tplProperty is saved in selectedGroup param of method, but it should be saved in parent tplProperty.



Thx for help :-)










share|improve this question






























    0















    i need help to send v-model from modal child to parent method.



    This is the modal with vmodel tplProperty.



    <template>
    <mdb-modal centered v-if="characteristicsModal">
    <mdb-modal-header>
    <mdb-modal-title>Neue Gruppe anlegen</mdb-modal-title>
    </mdb-modal-header>
    <mdb-modal-body>
    <div style="padding-left: 20px;">Eigenschaftname für currentSelectedGroup
    <input type="text" style="width: 90%;" v-model="tplProperty" name="tplProperty"></div>
    </mdb-modal-body>
    <mdb-modal-footer>
    <mdb-btn color="success" @click.native="saveProperty">Speichern</mdb-btn>
    </mdb-modal-footer>
    </mdb-modal>
    </template>
    <script>
    export default
    name: 'AddCharacteristicsModal',
    components:

    ,
    props:
    currentSelectedGroup: '',
    ,
    data()
    return
    tplProperty:''


    methods:

    saveProperty()
    this.$emit('saveProperty', this.tplProperty);
    ,


    </script>


    This is the parent:



    <AddCharacteristicsModal 
    @saveProperty="saveProperty" v-bind:currentSelectedGroup="currentSelectedGroup" />



    In data():



    tplProperty: '',


    And parent method:



     saveProperty(selectedGroup) 

    var self = this;
    // var selectedGroupKey = selectedGroup.toLowerCase().replace(/s/g, '').replace(/[^a-zA-Z0-9]/g, '');
    console.log("******SAVEPROP"+ selectedGroup);
    if(this.properties[selectedGroup] == undefined)
    this.properties[selectedGroup]=[self.tplProperty];
    else
    Object.keys(this.properties).forEach(function (key)
    if(key == selectedGroup)
    var mergeList = self.properties[key].concat([self.tplProperty]);
    //console.log('mergeList:'+JSON.stringify(mergeList));
    self.properties[key] = mergeList;

    );

    this.currentSelectedGroup = selectedGroup;
    this.tplProperty ='';

    this.templates[this.selectedTemplate].property = this.properties;

    console.log("hallo");

    //console.log("P::"+JSON.stringify(this.properties));
    //console.log("P:TZTZTZ:"+JSON.stringify(this.templates[this.selectedTemplate].groups));

    // this.allTemplate[this.selectedTemplate] = this.templates;
    //localStorage.removeItem("allTemplates");
    //localStorage.setItem('allTemplates', JSON.stringify(this.allTemplate));
    // console.log("jijiji:"+JSON.stringify(this.templates));
    ,


    The child v-model tplProperty is saved in selectedGroup param of method, but it should be saved in parent tplProperty.



    Thx for help :-)










    share|improve this question


























      0












      0








      0








      i need help to send v-model from modal child to parent method.



      This is the modal with vmodel tplProperty.



      <template>
      <mdb-modal centered v-if="characteristicsModal">
      <mdb-modal-header>
      <mdb-modal-title>Neue Gruppe anlegen</mdb-modal-title>
      </mdb-modal-header>
      <mdb-modal-body>
      <div style="padding-left: 20px;">Eigenschaftname für currentSelectedGroup
      <input type="text" style="width: 90%;" v-model="tplProperty" name="tplProperty"></div>
      </mdb-modal-body>
      <mdb-modal-footer>
      <mdb-btn color="success" @click.native="saveProperty">Speichern</mdb-btn>
      </mdb-modal-footer>
      </mdb-modal>
      </template>
      <script>
      export default
      name: 'AddCharacteristicsModal',
      components:

      ,
      props:
      currentSelectedGroup: '',
      ,
      data()
      return
      tplProperty:''


      methods:

      saveProperty()
      this.$emit('saveProperty', this.tplProperty);
      ,


      </script>


      This is the parent:



      <AddCharacteristicsModal 
      @saveProperty="saveProperty" v-bind:currentSelectedGroup="currentSelectedGroup" />



      In data():



      tplProperty: '',


      And parent method:



       saveProperty(selectedGroup) 

      var self = this;
      // var selectedGroupKey = selectedGroup.toLowerCase().replace(/s/g, '').replace(/[^a-zA-Z0-9]/g, '');
      console.log("******SAVEPROP"+ selectedGroup);
      if(this.properties[selectedGroup] == undefined)
      this.properties[selectedGroup]=[self.tplProperty];
      else
      Object.keys(this.properties).forEach(function (key)
      if(key == selectedGroup)
      var mergeList = self.properties[key].concat([self.tplProperty]);
      //console.log('mergeList:'+JSON.stringify(mergeList));
      self.properties[key] = mergeList;

      );

      this.currentSelectedGroup = selectedGroup;
      this.tplProperty ='';

      this.templates[this.selectedTemplate].property = this.properties;

      console.log("hallo");

      //console.log("P::"+JSON.stringify(this.properties));
      //console.log("P:TZTZTZ:"+JSON.stringify(this.templates[this.selectedTemplate].groups));

      // this.allTemplate[this.selectedTemplate] = this.templates;
      //localStorage.removeItem("allTemplates");
      //localStorage.setItem('allTemplates', JSON.stringify(this.allTemplate));
      // console.log("jijiji:"+JSON.stringify(this.templates));
      ,


      The child v-model tplProperty is saved in selectedGroup param of method, but it should be saved in parent tplProperty.



      Thx for help :-)










      share|improve this question














      i need help to send v-model from modal child to parent method.



      This is the modal with vmodel tplProperty.



      <template>
      <mdb-modal centered v-if="characteristicsModal">
      <mdb-modal-header>
      <mdb-modal-title>Neue Gruppe anlegen</mdb-modal-title>
      </mdb-modal-header>
      <mdb-modal-body>
      <div style="padding-left: 20px;">Eigenschaftname für currentSelectedGroup
      <input type="text" style="width: 90%;" v-model="tplProperty" name="tplProperty"></div>
      </mdb-modal-body>
      <mdb-modal-footer>
      <mdb-btn color="success" @click.native="saveProperty">Speichern</mdb-btn>
      </mdb-modal-footer>
      </mdb-modal>
      </template>
      <script>
      export default
      name: 'AddCharacteristicsModal',
      components:

      ,
      props:
      currentSelectedGroup: '',
      ,
      data()
      return
      tplProperty:''


      methods:

      saveProperty()
      this.$emit('saveProperty', this.tplProperty);
      ,


      </script>


      This is the parent:



      <AddCharacteristicsModal 
      @saveProperty="saveProperty" v-bind:currentSelectedGroup="currentSelectedGroup" />



      In data():



      tplProperty: '',


      And parent method:



       saveProperty(selectedGroup) 

      var self = this;
      // var selectedGroupKey = selectedGroup.toLowerCase().replace(/s/g, '').replace(/[^a-zA-Z0-9]/g, '');
      console.log("******SAVEPROP"+ selectedGroup);
      if(this.properties[selectedGroup] == undefined)
      this.properties[selectedGroup]=[self.tplProperty];
      else
      Object.keys(this.properties).forEach(function (key)
      if(key == selectedGroup)
      var mergeList = self.properties[key].concat([self.tplProperty]);
      //console.log('mergeList:'+JSON.stringify(mergeList));
      self.properties[key] = mergeList;

      );

      this.currentSelectedGroup = selectedGroup;
      this.tplProperty ='';

      this.templates[this.selectedTemplate].property = this.properties;

      console.log("hallo");

      //console.log("P::"+JSON.stringify(this.properties));
      //console.log("P:TZTZTZ:"+JSON.stringify(this.templates[this.selectedTemplate].groups));

      // this.allTemplate[this.selectedTemplate] = this.templates;
      //localStorage.removeItem("allTemplates");
      //localStorage.setItem('allTemplates', JSON.stringify(this.allTemplate));
      // console.log("jijiji:"+JSON.stringify(this.templates));
      ,


      The child v-model tplProperty is saved in selectedGroup param of method, but it should be saved in parent tplProperty.



      Thx for help :-)







      vue.js modal-dialog parent-child vsprops






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 26 at 19:44









      stefjoestefjoe

      64 bronze badges




      64 bronze badges

























          0






          active

          oldest

          votes










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55365154%2fvue-send-data-from-modal-child-to-parent-method%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55365154%2fvue-send-data-from-modal-child-to-parent-method%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript