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

61
Vistas
Explicitly Close Dropdown Menu Utilizing Element-UI

I have a drop down menu in a Vue application utilizing ElementUI which I need to explicitly close after applying some logic.

Essentially the flow is:

  1. Page loads, user clicks on a name from the drop down - name value gets written to database
  2. User reloads page, clicks on a different name, gets a pop-up asking if they want to save the new name

At this point, if the user confirms their choice, the new name gets written to the database, but the drop down stays open. I need to add some logic to call after the user confirms their choice in step 2 to ensure that the drop down doesn't stay open.

<div class="part">
    <span class="for-label"> Employee: </span>
    <el-select v-model="dataValue.assignedUser" filterable :disabled="notClick" @change="handle">
      <el-option
        v-for="(user, userIndex) in assignedOption"
        :key="userIndex"
        :label="user.userName"
        :value="user.userEmail"
      />
    </el-select>
  </div>

If relevant this bug only started occurring after adding the "filterable" attribute to the el-select.

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

0

I don't know why it would stay open, but you should be able to close it by calling its blur function.

add ref to the select and call the following when it should close.

this.$refs.select.blur()
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