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

How to catch $emit event in javascrit #9704

Closed
ShravanMweb opened this Issue Mar 14, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@ShravanMweb
Copy link

ShravanMweb commented Mar 14, 2019

No description provided.

@vue-bot

This comment has been minimized.

Copy link
Contributor

vue-bot commented Mar 14, 2019

Hello, your issue has been closed because it does not conform to our issue requirements. In order to ensure every issue provides the necessary information for us to investigate, we require the use of the Issue Helper when creating new issues. Thank you!


你好,你的 issue 不符合我们所要求的格式,因此已被自动关闭。为了确保每个 issue 都提供必需的相关信息,请务必使用我们的 Issue 向导 来创建新 issue,谢谢!

@vue-bot vue-bot closed this Mar 14, 2019

@ShravanMweb

This comment has been minimized.

Copy link
Author

ShravanMweb commented Mar 14, 2019

Version

2.6.2

Reproduction link

https://stackoverflow.com/users/10901207/shravan-sangishetti

Steps to reproduce

How to catch $emit event with v-on: in JavaScript. while doing
import MyGrid from 'MyGridcomponemt.vue'
import Vue from 'vue'
var myDynamicGrid = Vue.extend(MyGrid)
var instance = new myDynamicGrid({
propsData: { columns: this.columns,rowsperpage:this.rowsperpage,etc..}
})
instance.$mount() // pass nothing
//Will append to required place
this.$refs.container.appendChild(instance.$el)
Here I am able to pass prosData to MyGrid component but how do I catch those $emit events which will trigger by MyGrid component..

What is expected?

Can we catch $emit event in javascript??

How to catch $emit event with v-on: in JavaScript??
My code..
import MyGrid from 'MyGridcomponemt.vue'
import Vue from 'vue'
var myDynamicGrid = Vue.extend(MyGrid)
var instance = new myDynamicGrid({
propsData: { columns: this.columns,rowsperpage:this.rowsperpage,etc..}
})
instance.$mount() // pass nothing
//Will append to required place
this.$refs.container.appendChild(instance.$el)
Here I am able to pass prosData to MyGrid component but how do I catch those $emit events which will trigger by MyGrid component..

What is actually happening?

How to catch $emit event with v-on: in JavaScript. Dollowing is My code..
import MyGrid from 'MyGridcomponemt.vue'
import Vue from 'vue'
var myDynamicGrid = Vue.extend(MyGrid)
var instance = new myDynamicGrid({
propsData: { columns: this.columns,rowsperpage:this.rowsperpage,etc..}
})
instance.$mount() // pass nothing
//Will append to required place
this.$refs.container.appendChild(instance.$el)
Here I am able to pass prosData to MyGrid component but how do I catch those $emit events which will trigger by MyGrid component..


We are appending MyGrid component to its parent grid multiple times(to make subgrid) here parent gridcomponemt also the same component (MyGrid component). That has been done perfectly but while doing that we can pass only propsData but how to receive $emit event.. please see the following code

How to catch $emit event with v-on: in JavaScript. while doing

import MyGrid from 'MyGridcomponemt.vue'
import Vue from 'vue'
var myDynamicGrid = Vue.extend(MyGrid)
var instance = new myDynamicGrid({
propsData: { columns: this.columns,rowsperpage:this.rowsperpage,etc..}
})
instance.$mount() // pass nothing
//Will append to required place
this.$refs.container.appendChild(instance.$el)
Here I am able to pass prosData to MyGrid component but how do I catch those $emit events which will trigger by MyGrid component..

@leopiccionia

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.