Skip to content

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

@cohenaarone

Description

@cohenaarone

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions