Optionally use quickInfoTemplates

Hello,

How can I optionally use my own template based on event data? I'd like to default to the default views because otherwise I have to recreate the content template for every single popup that has "content"

The code below does NOT work

quickInfoTemplates: {
content: function (event) {
if (event.Type === 'Foo') {
return null
}
return {
template: AppQuickInfoContent
}
}
}


Is there some way to do it???

Thanks!


1 Reply

VM Vengatesh Maniraj Syncfusion Team February 28, 2022 01:37 PM UTC

We would like to let you know that we are not able to provide the quick info template for the particular events alone based on their type. When we use the template it will be applicable for all the event popup and cell popup. But it would be possible by using the default element structure within the template. You can differentiate the cell quick popup and event popup by checking it elementType. 


var contentTemplateVue = Vue.component("contentTemplate", {
template: `
<div v-if="$data.elementType === 'cell'">
/// Customize the default cell content
</div>
<div v-else">
<div v-if="$data.data.Type === 'Not Available'">
<h1>Hello World!</h1>
</div>
<div v-else>
/// Customize the default event content
</div>
</div>`,
});


Sample: https://codesandbox.io/s/vue-openeditor-issue-forked-rxv963?file=/src/App.vue

Kindly try the above solution and get back to us if you need any further assistance.



Loader.
Up arrow icon