No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Problem with upgrade to Q1.2.4, Dialog and i18n

    Help
    1
    2
    207
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rniestroj last edited by

      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"
      
      1 Reply Last reply Reply Quote 0
      • R
        rniestroj last edited by

        Found it. Had to add to the invocation: parent: this.
        Now it looks:

        this.$q
               .dialog({
                 component: OurDialog,
                 typ: this.typ,
                 parent: this
               })
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post