[solved] BaseSelect by @metalsadman

  • 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):
      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? (webpack)/hot/dev-server.js ./.quasar/client-entry.js

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

  • 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?

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

  • @metalsadman thank you so much. It worked great.

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

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

Log in to reply