title: How to find out which child component caused the parent?
body: <p>There are several components, at first there is one big one that creates other components.</p>
  
  <p><a href="http://joxi.ru/DmBl36VFJwq4NA" rel="nofollow noreferrer">http://joxi.ru/DmBl36VFJwq4NA</a></p>
  
  <p>They in turn contain other components.</p>
  
  <p><a href="http://joxi.ru/82QZGyRfwj89wA" rel="nofollow noreferrer">http://joxi.ru/82QZGyRfwj89wA</a></p>
  
  <p>On the page there are various clickable elements that open a popup with a select. Popup is another vue component. Popup accepts data and displays it in a select. Next, the user selects something in this select and presses the confirmation button. </p>
  
  <p>I need to associate the result of the popup with a specific element in the component. The problem is that the user can open a pop-up of all three components. Clicks on all these items open pop-up</p>
  
  <p><a href="http://joxi.ru/52a53oGUE4lke2" rel="nofollow noreferrer">http://joxi.ru/52a53oGUE4lke2</a></p>
  
  <p>but all these elements are in different components</p>
  
  <p>There is code of main component which is contains pop-up component</p>
  
  <pre><code>    &lt;template&gt;
          &lt;!--some html--&gt;
              &lt;select-modal @close-modal="hideSelectModal" v-if="selectModal" :data="selectModalData"&gt;&lt;/select-modal&gt;
          &lt;!--some html--&gt;
      &lt;/template&gt;
  
  &lt;script&gt;
          data: () =&gt; ({
              selectModal: false,
              selectModalData: {},
          }),
  
          methods: {
              showSelectModal(data, event){
  
                  if(this.selectModal === true){
                      this.hideSelectModal();
                  }else{
                      this.selectModalData = data;
                      this.selectModal = true;
                  }
              },
  
              hideSelectModal(){
                  this.selectModalData = [];
                  this.selectModal = false;
              },
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>There is code of how i pass data from child compoentns to parent</p>
  
  <pre><code>methods: {
      showModal(dataArr, selectedItem, action, event){
  
          let selectObject = {items: [], selected: selectedItem, action: action};
          for(let i = 0; i &lt; dataArr.length; i++){
              selectObject.items.push({value: dataArr[i].id, text: dataArr[i].name})
          }
  
          this.$emit('open-modal', selectObject, event);
      }
  },
  </code></pre>
  
  <p>there is update method inside pop-up component</p>
  
  <pre><code>  update(){
  
        if(this.value === null){
            return false;
        }
  
        switch(this.data.action){
            case 'serie':
                this.updateGameSerie();
                break;
            case 'game':
                this.updateGame();
                break;
            case 'set':
                this.updateSet();
                break;
        }
    },
  </code></pre>
  
  <p>But I think that pass action as a string not a good idea. Mb there is some stack trace?</p>
  
  <p>There are two troubles.</p>
  
  <p>1 - how the popup can find out from which component the data was transferred to it?</p>
  
  <p>2 - How to associate the pop-up selection result with the data of the child components in order to redefine them?</p>