josefarias / hotwire_combobox

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

Multiselect values as array #202

Closed Alejandro-Bernal-M closed 2 months ago

Alejandro-Bernal-M commented 2 months ago

Hi! First of all, thank you for this amazing tool. I have implemented the multi-select combobox inside a ransack search (skills_name_in) but it expects an array. Is it possible to configure the multi-select to send the array of values instead of a string?

josefarias commented 2 months ago

Hey @Alejandro-Bernal-M, glad to know the library's been useful

You should be able to convert the string into an array via e.g. params[:values].split(","). Let me know if that doesn't work for you, closing for now. But happy to reopen.

Alejandro-Bernal-M commented 2 months ago

Thank you for the fast response, at this moment I'm working with that approach but I wanted to know if there was a way to avoid processing the parameters. I will keep that approach then. Thank you again