lekoala / bootstrap5-autocomplete

Autocomplete for Bootstrap 5 (and 4!)
MIT License
87 stars 16 forks source link

ACTIVE_CLASSES prevents default/custom styling of dropdown items #6

Closed benwallis closed 1 year ago

benwallis commented 1 year ago

Could you please remove "bg-primary" and "text-white" from ACTIVE_CLASSES?

https://github.com/lekoala/bootstrap5-autocomplete/blob/master/autocomplete.js#L73

Those classes override the normal bootstrap dropdown styling. If they are removed it would be easy to customise the dropdown-item styling using the SASS/CSS variables for dropdowns e.g. https://getbootstrap.com/docs/5.3/components/dropdowns/#variables

Thanks!

lekoala commented 1 year ago

@benwallis fair point. the goal is to make it work "out of the box" but i added an activeClasses config (check demo.html to see it in action) in https://github.com/lekoala/bootstrap5-autocomplete/releases/tag/1.1.2