-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for blank option #15
Comments
Hi Denis, happy to hear you like the gem. Support for a blank option is currently still missing. There is an open PR (#14) that enables Select2's I'm happy to accept a PR that does not change existing use cases and includes specs/docs for the new ones. Best |
Hi Denis, you can pass the options to be able to clear the select to the select2 control by the form do |f|
f.semantic_errors(*f.object.errors.attribute_names)
f.inputs do
f.input :article, as: :searchable_select, input_html: { data: { 'allow-clear': true, placeholder: '' } }
end
f.actions
end Kind regards |
Hi Dirk, Wow, I had forgotten I even asked this question. :-) Thanks for responding. Somewhere along the line we discovered the
|
First off, thank you very much for creating activeadmin-searchable_select. We've been using ActiveAdmin in our Rails app for 5 years, and as the amount of data in our database has grown, we've struggled with all the problems that select controls with too many options in them brings. Integrating AJAX-based select2 controls into ActiveAdmin with your gem was easy, and vastly improves the UX within ActiveAdmin.
One thing we're missing from the old select controls in our ActiveRecord filters and forms is a blank option and the ability to clear the currently selected option. Does activeadmin-searchable_select support this? If not, would it be possible to add this feature?
Thanks,
Denis
The text was updated successfully, but these errors were encountered: