Skip to content

How can I dynamically change the choices in the choices Array. #62

Open
@ShaheryarAbid

Description

@ShaheryarAbid

Hi there,
I hope you shall be fine. I am using this autocomplete plugin for my project and is very helpful. Thank you for making it.
I am facing one issue though. I want to dynamically change the values in the choices array. How can I do that. If you look at the screenshots attached. I am using the autocomplete feature in the 2nd field. And the results in this field come on the basis of the choice selected in the first dropdown field. So I want to change the suggestions inside the 2nd field based on the value selected in the first dropdown field.
I am trying but I am unable to reset the choices array. Can you help me with that ?

I am using the method of searching in the local data. So I am setting "choices = choicesArray". The values in the choicesArray change dynamically but the choices array of your code remains the same. Kindly let me know of the solution.

Thanks,
Shaheryar Abid.
autocomplete

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions