afcapel / stimulus-autocomplete

Stimulus autocomplete component
MIT License
478 stars 61 forks source link

Make the query paramater name `q` customizable #111

Closed kulbirsaini closed 2 years ago

kulbirsaini commented 2 years ago

It'd be nice if the query paramater name q was customizable via the stimulus paramater/value HTML attribute like

<div data-controller="autocomplete"
    data-autocomplete-url-value="/birds/search"
    data-autocomplete-query-param="name_or_desc_cont"
    .... />

This will make it really easy to integrate with Rails search gems like Ransack.

kulbirsaini commented 2 years ago

bump!

afcapel commented 2 years ago

Fixed in https://github.com/afcapel/stimulus-autocomplete/pull/112