Skip to content
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

[BUG] If config.default_select is initialized to "default", adding input_html: { class: "default-select" } to an input doesn't enable Slim Select #513

Open
cohenaarone opened this issue Jan 14, 2025 · 0 comments
Labels

Comments

@cohenaarone
Copy link

Describe the bug
According to the doc, if I add the following to my initializer ...

ActiveadminAddons.setup do |config|
  config.default_select = "default"
end

... I should then be able to selectively enable Slim Select by adding input_html: { class: "slim-select" } to an input, as per the example:

f.input :created_at, input_html: { class: "slim-select" }

However, that doesn't work: I've tried with filters, form do blocks and active_admin_form_for blocks, and in no context does it work.

To Reproduce

Do exactly as described above to repro.

Expected behavior

I expected the standard Slim Select dropdown, just like you get with config.default_select = "select2"

Screenshots

The repro recipe is simple enough, let's not bother.

Additional context

I would like this to work because I want the default AA select behavior for all select lists that don't exceed more than ~10 items on the list, which in turn is because there's no reason to have a search box and larger select list items when there are only a handful of items: it's easier and less imposing for the User to just skim a small list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant