josefarias / hotwire_combobox

An accessible autocomplete for Ruby on Rails.
https://hotwirecombobox.com
MIT License
456 stars 30 forks source link

Show clear widget on prefilled state #108

Closed jlw closed 5 months ago

jlw commented 6 months ago

When I pushed up #92 I had not yet added any tests over the functionality, and so during the refactoring one bit of functionality was lost without being noticed. When I load an edit form where a combobox field already has a value, I expect to see the clear handle instead of the open handle. This adds the simplest test scenario and corresponding fix that I could think of.

josefarias commented 5 months ago

Great catch, and an elegant solution + test. Love to see it! Thanks!