josefarias / hotwire_combobox

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

Make `:for_id` optional in async options #64

Closed josefarias closed 6 months ago

josefarias commented 6 months ago

Closes https://github.com/josefarias/hotwire_combobox/discussions/62

In most cases, the async combobox's id can be inferred from the incoming filter request. If we do that, then you don't need to pass :for_id most of the time.

The kwarg is still supported, so you can still specify an id if you absolutely need to.

excid3 commented 6 months ago

Looks good to me! Will try this out shortly.

josefarias commented 6 months ago

Thanks @excid3! It's not released yet so just be sure to point your gem to main.

Been cutting releases pretty frequently though so it'll be out soon anyway.