Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

133
Vistas
Vuetify search on keypress

I have a basic text field which on keypress would send the search request to backend.

<template>
  <v-form
    ref="form"
  >
    <v-text-field
      v-model="deviceId"
      label="Search"
      required
      clearable
      name="searchInput"
      @keyup.native="updateStore"
    />
  </v-form>
</template>

and this is the script

  device : string | undefined = undefined

  get deviceId () : string | undefined {
    if (this.device === undefined) {
      this.device = store.selectedDevice
    }
    return this.device
  }

  set deviceId (value : string) {
    store.selectDevice(value)
    this.device = value
  }

  updateStore (value: string): void {
    console.log(value)
    store.selectDevice(value)
  }

The problem is it doesn't send request for all the characters typed in the search. So if I type 'ping', query only sends query=p. However, if I copy paste the string in the search bar, then it sends query=ping.

Not sure which vueitfy event to use or if the template structure is incorrect?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Try to use input event instead of keyup :

<template>
  <v-form
    ref="form"
  >
    <v-text-field
      v-model="deviceId"
      label="Search"
      required
      clearable
      name="searchInput"
      @input="updateStore"
    />
  </v-form>
</template>
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda