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. iamtetea
    I
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 4
    • Best 0
    • Groups 0

    iamtetea

    @iamtetea

    0
    Reputation
    1
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    iamtetea Follow

    Latest posts made by iamtetea

    • How to use select option-label function?
          :option-label="(deliveryBoyOptions) => deliveryBoyOptions === null ? 'Null Value' : deliveryBoyOptions.user.display_name"
      

      below is how i query my data list:

      apollo: {
          vehicles: {
            prefetch: true,
            query: getDeliveryAgents,
      
            update (data) {
              this.deliveryBoyOptions = data.delivery_agents
            }
          }
        }
      

      and i want to show display_name in option-label

      {data: {delivery_agents: [{id: "0dc65e15-c624-44f2-8dce-5b66995d1fdb",…}]}}
      data: {delivery_agents: [{id: "0dc65e15-c624-44f2-8dce-5b66995d1fdb",…}]}
      delivery_agents: [{id: "0dc65e15-c624-44f2-8dce-5b66995d1fdb",…}]
      0: {id: "0dc65e15-c624-44f2-8dce-5b66995d1fdb",…}
      booking_counter_id: "caa68d7f-6bc0-42b4-9645-b60958514e9b"
      id: "0dc65e15-c624-44f2-8dce-5b66995d1fdb"
      user: {display_name: "Tetea", __typename: "users"}
      display_name: "Tetea"
      __typename: "users"
      user_id: "1d20117d-1256-4800-9bb2-d6a5916d2277"
      __typename: "delivery_agents"
      

      the display_name is coming from delivery_agents.user.display_name

      i cannot show in the option label and it shows display_name of undefined

      Please Help. Thanks

      posted in Framework
      I
      iamtetea
    • Is there a way to add some header information in table export .csv?
      exportTable () {
        // naive encoding to csv format
        const content = [ this.columns.map(col => wrapCsvValue(col.label)) ].concat(
          this.data.map(row => this.columns.map(col => wrapCsvValue(
            typeof col.field === 'function'
              ? col.field(row)
              : row[col.field === void 0 ? col.name : col.field],
            col.format
          )).join(','))
        ).join('\r\n')
      
        const status = exportFile(
          'table-export.csv',
          content,
          'text/csv'
        )
      
        if (status !== true) {
          this.$q.notify({
            message: 'Browser denied file download...',
            color: 'negative',
            icon: 'warning'
          })
        }
      }
      posted in Framework
      I
      iamtetea
    • RE: How can i get the actual value for select options? I am getting the options value as [object Object]

      Finally i realise where i made a mistake! in case anyone stuck in this error, change option:“label” to “category_name”

      posted in Framework
      I
      iamtetea
    • How can i get the actual value for select options? I am getting the options value as [object Object]

      <q-select
      v-model=“product_type”
      :options=“types”
      option-label=“label”
      option-value=“type_name”
      label=“Product Type”
      emit-value
      map-options
      />

      data () {
          return {
              types: []
          }
      },
      created () {
          this.$axios.get(['http://127.0.0.1:8000/api/lailen-inventory/types'])
              .then(res => {
                  this.types = res.data.types
              }).catch(errors => {
                  console.log(errors)
              })
      }
      posted in Framework
      I
      iamtetea