Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VaSelect with autocomplete not working correctly #4439

Open
rbaezam opened this issue Dec 11, 2024 · 0 comments
Open

VaSelect with autocomplete not working correctly #4439

rbaezam opened this issue Dec 11, 2024 · 0 comments
Labels
BUG Something isn't working

Comments

@rbaezam
Copy link

rbaezam commented Dec 11, 2024

Vuestic-ui version: 1.10.3

Description

I'm using the VaSelect with the autocomplete attribute to allow the users to write part of the string to be able to select an element from the drop down.

  • What is current behaviour
    It works fine when the model is null, but if the model has a valid value, it shows the id and if I click in the dropdown arrow, it shows the text for noOptions. If the user deletes the text, then the options are displayed correctly.
    If I remove the autocomplete attribute, it works fine for both cases (null model and valid model).

  • What is expected behaviour
    When the VaSelect v-model attribute has a value different than null, it should show the selected value and if the user clicks on the dropdown arrow, it should display all the available options.

Reproduction

My code looks like this:

<VaSelect
          v-model="newDocumento.tipoDocumentoId"
          label="Tipo de documento *"
          class="w-full sm:w-4/6"
          autocomplete
          :options="tiposDocumentos"
          :rules="[validators.required]"
          name="tipoDocumentoId"
          placeholder="Selecciona un tipo de documento"
          text-by="nombre"
          value-by="id"
          no-options-text="No hay tipos de documento"
        />

Id instead of nombre (name) in the dropdown input:
image

No options when clicking on dropdown button:
image

Deleting the text from the input and clicking the dropdown button again, now it shows the options:
image

@rbaezam rbaezam added the BUG Something isn't working label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

1 participant