Problem with upgrade to Q1.2.4, Dialog and i18n
-
Hi,
after upgrading from Quasar 1.0.5 to 1.2.4 two things are not working. Previously i had tried update to 1.1.6 and had the same problems. Any ideas?
The problem is with a component that is opened in a dialog in a Vue SFC.The error message is:
Error in data(): "TypeError: i18n is undefined"
data() { return { typToLabelMap: new Map([ //says error is on this line [TerminTyp.TYP1, this.$t("key.typ1")], [TerminTyp.TYP2, this.$t("key.typ2")], [TerminTyp.TYP3, this.$t("key.typ3")], [TerminTyp.TYP4, this.$t("key.typ4")] ]),
The dialog is invoked like this:
onClickOpenDialog() { this.$q .dialog({ component: OurDialog, typ: this.typ }) .onOk(data => { this.reRenderAll(); }); },
Second problem is: in the dialog there is a ref to the dialog: <q-dialog ref=“dialog”>
And he does not see that dialog as well:
[Vue warn]: Error in mounted hook: "TypeError: this.$refs.dialog is undefined"
-
Found it. Had to add to the invocation: parent: this.
Now it looks:this.$q .dialog({ component: OurDialog, typ: this.typ, parent: this })