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

    [solved] BaseSelect by @metalsadman

    Help
    2
    5
    73
    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.
    • PeterQF
      PeterQF last edited by PeterQF

      Hi all (and hopefully @metalsadman ),

      Im trying to implement BaseSelect from @metalsadman 's codesandbox: https://codesandbox.io/s/codesandbox-app-0ybb3

      but i get:

       ERROR  Failed to compile with 1 errors                                                                                                                                             12:28:33
      
       error  in ./src/components/BaseComponents/BaseSelect.vue
      
      Module Error (from ./node_modules/eslint-loader/index.js):
      
      /Users/peter/node/server-client/q-hyreshuset/admin-hyreshuset/src/components/BaseComponents/BaseSelect.vue
        90:12  error  Unexpected side effect in "computedOptions" computed property  vue/no-side-effects-in-computed-properties
      
      ✖ 1 problem (1 error, 0 warnings)
      
      
       @ ./src/components/BaseComponents/index.js 1:0-42 2:0-22
       @ ./src/boot/base-components.js
       @ ./.quasar/client-entry.js
       @ multi (webpack)-dev-server/client?http://0.0.0.0:7001 (webpack)/hot/dev-server.js ./.quasar/client-entry.js
      

      Any idea how to solve this. I really need an array filled select with autocomplete.

      1 Reply Last reply Reply Quote 0
      • PeterQF
        PeterQF last edited by

        The problem is in this code:

           computedOptions() {
              return this.selfFilter
                ? this.options
                : (this.options = this.$attrs.options)
            },
        

        On this line_

        (this.options = this.$attrs.options)
        

        any idea how to rewrite this line to please eslint?

        metalsadman 1 Reply Last reply Reply Quote 0
        • metalsadman
          metalsadman @PeterQF last edited by

          @PeterQF remove the assignment, return this.selfFilter ? this.options : this.$attrs.options.

          1 Reply Last reply Reply Quote 1
          • PeterQF
            PeterQF last edited by

            @metalsadman thank you so much. It worked great.

            Please forgive my stupid questions but how do i mark topic as solved?

            1 Reply Last reply Reply Quote 0
            • metalsadman
              metalsadman last edited by

              @PeterQF edit your first post, then you can edit this thread’s title, put something like [Solved] your title something like that.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post