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. Denis Correia
    D
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 5
    • Best 1
    • Groups 0

    Denis Correia

    @Denis Correia

    2
    Reputation
    46
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Denis Correia Follow

    Best posts made by Denis Correia

    • Testing: wrapper.setValue() cannot be called on this element

      I can not assign a value to the q-input component when using jest

      //test.js
      import { mountQuasar } from '~/test/jest/utils'
      import PAGE from '../demo/QBtn-demo.vue'
      
      const wrapper = mountQuasar(PAGE)
      describe('Banco Page', () => {
        it ('Cadastro novo banco', () => {
          const inputCodigo = wrapper.find({ ref: 'codigo' })
          inputCodigo.setValue('bar')
          expect(wrapper.vm.codigo).toBe('bar')
        })
      })
      
      // QBtn-demo.vue
      
      <template>
        <q-page>
           <!--<input v-model="codigo" ref="codigo"/>-->
          <q-input v-model="codigo" ref="codigo"></q-input>
        </q-page>
      </template>
      
      <script>
      export default {
        name: 'PAGE',
        data () {
          return {
            codigo: ''
          }
        },
        methods: {
        }
      }
      

      I’m getting the following error: [vue-test-utils]: wrapper.setValue() cannot be called on this element however if I remove <q-input> and only use <input /> works perfectly.

      Do I need to do something different to assign value to a quasar input ?

      posted in Framework
      D
      Denis Correia

    Latest posts made by Denis Correia

    • Testing: wrapper.setValue() cannot be called on this element

      I can not assign a value to the q-input component when using jest

      //test.js
      import { mountQuasar } from '~/test/jest/utils'
      import PAGE from '../demo/QBtn-demo.vue'
      
      const wrapper = mountQuasar(PAGE)
      describe('Banco Page', () => {
        it ('Cadastro novo banco', () => {
          const inputCodigo = wrapper.find({ ref: 'codigo' })
          inputCodigo.setValue('bar')
          expect(wrapper.vm.codigo).toBe('bar')
        })
      })
      
      // QBtn-demo.vue
      
      <template>
        <q-page>
           <!--<input v-model="codigo" ref="codigo"/>-->
          <q-input v-model="codigo" ref="codigo"></q-input>
        </q-page>
      </template>
      
      <script>
      export default {
        name: 'PAGE',
        data () {
          return {
            codigo: ''
          }
        },
        methods: {
        }
      }
      

      I’m getting the following error: [vue-test-utils]: wrapper.setValue() cannot be called on this element however if I remove <q-input> and only use <input /> works perfectly.

      Do I need to do something different to assign value to a quasar input ?

      posted in Framework
      D
      Denis Correia
    • Slot in table [ V1 ]

      Good morning, how can I pass a Slot on the table?
      I have the quasar table.

      //MyTable
      0_1551878384742_5c3494e1-f1ef-4612-b0f9-68ca7b6ff554-image.png

      I need to pass td when the table is called.

      //MyPage
      0_1551878499073_e1d86826-4db6-401c-92aa-75f9993c5962-image.png

      This is giving me bugs on the console.

      0_1551878698385_20186acc-fdff-4730-897f-f38d9181991a-image.png

      What is the correct way to pass td as a slot in the table?

      edit01

      I managed to make it work, would it be the right way?

      //MyTable
      0_1551880211615_9bded4f7-f953-490a-aee2-5d3c283ebe90-image.png

      //MyPage
      0_1551880293703_078d8dda-8f83-4978-ab72-8be386faef00-image.png

      this works, but would have any problem doing this?

      posted in Help
      D
      Denis Correia
    • RE: How to Update a DataTable Record

      It worked, had to change to the method:
      https://vuejs.org/v2/guide/reactivity.html

      posted in Help
      D
      Denis Correia
    • RE: How to Update a DataTable Record

      Example: https://ibb.co/doijGp

      posted in Help
      D
      Denis Correia
    • How to Update a DataTable Record

      How can I do to change an object listed in the DataTable?
      I’m trying like this:
      I have the table
      0_1538098074342_c253138b-ae53-4bd4-b666-10b8331e59e7-image.png

      after editing the object I run the list and change to the new value
      0_1538098282406_d1b79dae-8684-41b7-b45e-5486811b2ad6-image.png

      0_1538098301106_90582603-82e0-4280-a005-a1d99dd65e6e-image.png

      but this does not make the value change immediately, I need to change the pagination in the table and go back before the value changes.

      Exemple

      Edit1:
      Conforme indicado por: @aleks86dev#8670

      0_1538134209018_f72efdd9-f2d8-488d-a5ee-106efbc9c80e-image.png

      That worked

      posted in Help
      D
      Denis Correia