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
    1. Home
    2. rniestroj
    R
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 5
    • Best 0
    • Groups 0

    rniestroj

    @rniestroj

    0
    Reputation
    6
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    rniestroj Follow

    Latest posts made by rniestroj

    • Passing props through wrapper or overriding default props

      Hi,
      i’ve created a wrapper over q-select like this, let’s call it OrganisationSelect:

      <template lang="pug">
        q-select(
          :options="organisations"
          option-value="id"
          v-bind="$attrs"
          v-on="$listeners"
          :option-label="item => item.details.name"
          :label="this.defaultLabel()")
      </template>
      

      Evrything works as expected, props and events are passed.

      Now when i use it i want to override the :label

      div.col-4
       OrganiastionSelect(
        :rules="[val => !!val || 'Please select an Organisation']"
        v-model='organisation'
        :label="this.otherLabel()"
        dense
      ).col-6
      

      But this does not work. It displays always the default label. How to make this work?

      posted in Framework
      R
      rniestroj
    • RE: Problem with upgrade to Q1.2.4, Dialog and i18n

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

      this.$q
             .dialog({
               component: OurDialog,
               typ: this.typ,
               parent: this
             })
      
      posted in Help
      R
      rniestroj
    • 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"
      
      posted in Help
      R
      rniestroj
    • RE: How to check child components for errors?

      I saw QForm and QForm has an event @validation-error if any of his inner QInputs has an error but my GUI expects an save button on the end of the whole QStepper so this seems not quite feasible.

      posted in Framework
      R
      rniestroj
    • How to check child components for errors?

      Hi,
      i have a QStepper with 3 QSteps. Each QStep has a few QInput. I want to set :error on a QStep if any of his child QInputs has an error for example a required field is missing.

      How to to this?

      I have code like this (this is the template in PUG):

      qstep(:error= hasStepError)
        .col-12.q-pa-sm 
           q-input.col-12.q-pa-sm(:rules="[val => !!val || 'Field is required']" :label='Label' )
      

      This hasStepError is a boolean field in data():

      data() {
        return {
          hasStepError: false,
      

      So when hasStepError is true i get the error icon on the step - how i want it

      047ab537-ca2c-4445-b5e0-443791445e74-obraz.png

      But now how can i change this hasStepError when one of the child components has an error?

      I have tried adding an eventlistener on the QInput like this: @input=‘onInput($event)’ but in $event i get the value not the components so i cannot check if it has an error.

      posted in Framework
      R
      rniestroj