stimulus-autocomplete icon indicating copy to clipboard operation
stimulus-autocomplete copied to clipboard

Additional event on select

Open pySilver opened this issue 3 years ago • 3 comments

Hey!

That would be nice to have an event when select occurs, so one can dynamically update input value. That would allow to follow the same logic as Google and others use when suggestions are works as query prefix rather than final query.

pySilver avatar May 17 '22 13:05 pySilver

@pySilver autocomplete.change already fires when the user selects a value. You can indeed use it to update other fields in the form.

afcapel avatar May 17 '22 15:05 afcapel

@afcapel it fires when selection is committed. I've meant an event that would be fired while user perform arrow navigation (when select method is called)

pySilver avatar May 17 '22 15:05 pySilver

Oh, I see, feel free to send a PR if you need the event 👍

afcapel avatar May 17 '22 15:05 afcapel