alphagov / accessible-autocomplete

An autocomplete component, built to be accessible.
https://alphagov.github.io/accessible-autocomplete/examples/
MIT License
919 stars 149 forks source link

unsetting the value that is been set is not working #599

Open kth13 opened 1 year ago

kth13 commented 1 year ago

We are using the accessible auto complete for our application. We are using the js along with Nunjucks. The steps to reproduce the error

DavidBiddle commented 5 days ago

We got feedback about a case of this on a service we have which uses the autocomplete. In our case it was noticed when using a 'change your answers' journey - if a user:

then their original answer will be saved.

I can see this potentially being confusing in this context, but I'm not sure if there's another behaviour we'd expect. The component is designed to allow a user to pick from a list of predefined values, and an empty value isn't a valid value, so I can see the logic of not allowing a user to unset it.