BoldDesk®Customer service software offering ticketing, live chat, and omnichannel support, starting at $49/mo. for 10 agents. Try it for free.
Dear support,
I have a props, "horseCollection", wich returns a list of horses.
Il would like to use this props so as to give it to my propsData inside the "getContentTemplate" method, in order to use it in a dialog.
My problem is that I dont find the way to pass my props "horseCollection" into the "myData" propsData of the "getContentTemplate" method.
Can you help me ?
Here is the code of the vue :
contentTemplate: function () {
return () => {
return {
template: {
extends: ContentTemplate,
propsData: {
horseCollection: this.horse.data,
},
},
};
};
}, |
export default {
data: function () {
return {
headerProp: "",
horse: {
data: [
{ message: "List Item 0" },
{ message: "List Item 2" },
{ message: "List Item 3" },
{ message: "List Item 4" },
],
},
…..
…..
|
export default {
name: "ContentTemplate",
props: ["horseCollection"],
}; |
Hi,
I'm interested in this question also and I was wondering how you can get the Close button in the footer to work and how you would you pass back information from the template to the calling page
<template>
<ejs-button class="e-btn" v-on:click.native="handleClick">{{
footerProp
}}</ejs-button>
</template>
<script>
export default {
name: "FooterTemplate",
props: ["footerProp"],
methods: {
handleClick: function () {
alert("Footer button clicked");
},
},
};
</script>
|
<script>
import { eventBus } from "./main";
export default {
created: function () {
eventBus.$on("ChangeUsername", (data) => {
alert(data);
});
},
};
</script>
|
<template>
<ejs-button class="e-btn" v-on:click.native="handleClick">{{
footerProp
}}</ejs-button>
</template>
<script>
import { eventBus } from "../main";
export default {
methods: {
handleClick: function () {
alert("Footer button clicked");
eventBus.$emit(
"ChangeUsername",
"Footer component passed information to parent component"
);
},
},
};
</script>
|