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

190
Vistas
Desplazamiento infinito de Vue js (selección de árboles)

Estoy tratando de implementar un desplazamiento infinito en vue js a través de treeselect. Intenté hacerlo así: https://github.com/riophae/vue-treeselect/issues/275 Parecía funcionar para ellos, sin embargo, recibo este error:

 [Vue warn]: Error in nextTick: "TypeError: _this.$refs.tree.getMenu is not a function"

Captura de pantalla de error

Aquí está el código

Modelo:

 <div class="invite_form--item"> <treeselect ref="tree" :options="infiniteOptions" @open="handleMenuOpen" /> </div>

Guion:

 methods:{ handleMenuOpen() { this.$nextTick(() => { for(const item of this.$refs.tree){ console.log(item) } const menu = this.$refs.tree.getMenu() const hasReachedEnd = menu.scrollHeight - menu.scrollTop <= menu.clientHeight * 1.25 menu.addEventListener('scroll', () => { if (hasReachedEnd) this.fetchOptions() }) }) }, fetchOptions() { if (this.isFetchingOptions) return this.isFetchingOptions = true xhr().then(newOptions => { this.options.push(...newOptions) this.isFetchingOptions = false }) }, }

Si alguien tiene alguna pista sobre este error, realmente agradecería su ayuda :)

about 4 years ago · Juan Pablo Isaza
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