Vuesax: vs-select with Autocomplete functionality throws .querySelector is not a function

Created on 18 Jan 2019  路  4Comments  路  Source: lusaxweb/vuesax

  • Your OS: Windows 10 Pro, Version 1709, Build 16299.846
  • Node.js version: v10.14.2
  • Vuesax version: [email protected]
  • Browser version: Google Chrome Version 71.0.3578.98 (Official Build) (64-bit)
  • Which package manager did you use for the install?: NPM



Having this vs-select with Autocomplete functionality activated:

<vs-select label="Sistema" v-model="projectId" autocomplete>
     <vs-select-item
     :key="project._id"
     :value="project._id"
     :text="project.name"
     v-for="project in projects"
     ></vs-select-item>
</vs-select>

When I press the DOWN ARROW key to navigate down between the options, if I continue navigating down I receive this error:

getNextLi(...).querySelector is not a function

at vs-select-item component, in this section of code:

if (nextElement) {
        nextElement.querySelector('.vs-select--item').focus();
      } else {
        if (lengthx === children.length) lengthx--;
        getNextLi(children[lengthx].$el, orientationObject)
        .querySelector('.vs-select--item')
        .focus();
}

video here

It just happens when I press DOWN ARROW. Instead when I press UP ARROW it doesn't throw any errors and moves fine through the list of options.

bug

All 4 comments

We will verify the error and correct it, thank you very much for communicating it will keep you informed of any progress

Ready, the problem is fixed, thank you very much for the contribution

Thank you @luisDanielRoviraContreras , is this fix published in version 3.8.15?

@ccalvarez Yes in the latest version

Was this page helpful?
0 / 5 - 0 ratings