Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

418
Visualizações
Multiselect Vue - Is there a way to bypass the option filtering method?

I m using the plugin Vue - Multiselect Js ( Github )

I currently have same code as in the Ajax example except my research api return me more data than Multiselect expect.

import Multiselect from 'vue-multiselect'
import { ajaxFindCountry } from './countriesApi'

export default {
  components: {
    Multiselect
  },
  data () {
    return {
      selectedCountries: [],
      countries: [],
      isLoading: false
    }
  },
  methods: {
    limitText (count) {
      return `and ${count} other countries`
    },
    asyncFind (query) {
      this.isLoading = true
      ajaxFindCountry(query).then(response => {
        this.countries = response
        this.isLoading = false
      })
    },
    clearAll () {
      this.selectedCountries = []
    }
  }
}

When I request "Hello world" to the Api, it can return "World hello" too, because it match any words (not only the successives chars).

Like in the example if you search barbuda you can found Antigua and Barbuda

barbuda

And if that not perfecly match (just adding space) Antigua and Barbuda option is hidden. (I know is not my API so options are not exactly same but in practice that my current result)

barbuda space


Is it possible to don't have exact same match between options and search ?

about 4 years ago · Santiago Gelvez
1 Respostas
Responde à pergunta

0

As mentioned in the example and docs, you can use :internal-search="false" prop on vue-multiselect component to disable the internal filtering logic.
By doing so, options will not be filtered anymore by the component internally and if required you can write your own custom logic to filter options.

about 4 years ago · Santiago Gelvez Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda