Hi Syncfusion,
I'm having an issue on using the DialogBox. From this page -
link - we are supposed to use ref='dialogboxname' to get it later with this->$refs.
But in my case the DialogBox doesn't himself as ref for a reason i don't get. I'm already using this ref attribute on another component, treegrid, and it works fine.
I'm using the DialogBox in a vue component with this content :
<template>
<div>
<ejs-dialog
ref="dlgBox"
:header='header'
:target='target'
:width='width'
:buttons='buttons'
:content='content'
:open="dlgOpen"
:close="dlgClose">
</ejs-dialog>
</div>
</template>
<script>
import Vue from "vue";
import { DialogPlugin } from '@syncfusion/ej2-vue-popups';
import { ButtonPlugin } from '@syncfusion/ej2-vue-buttons';
Vue.use(DialogPlugin);
Vue.use(ButtonPlugin);
export default {
name: "DialogBox",
data: function() {
return {
/**
* Configuration de la dialog box
*/
target: "#app",
width: '335px',
header: 'Suppression',
content: 'Êtes-vous sur de supprimer les familles de matières ?',
buttons: [{
click: this.dlgButtonClick,
buttonModel: {
content: 'Valider',
isPrimary: true
}},
{
click: this.dlgButtonClick,
buttonModel: {
content: 'Annuler'
}
}
],
}
},
methods: {
dlgClose: function() {
document.getElementById('dlgbtn').style.display = '';
},
dlgOpen: function() {
document.getElementById('dlgbtn').style.display = 'none';
},
dlgButtonClick: function() {
this.$refs.dlgBox.hide();
},
}
}
</script>
<style scoped>
</style>
If i remove the visible attribute, the DialogBox appears, so it's properly loaded. But there is no way to get this component register as the treegrid component.
So am i doing wrong or what am i missing ?
Any help would be appreciate, than you !