As default behavior, all select controls in your admin app will be wrapped by Slim Select.
If you don't want to use it in a specific control, just add the "default-select"
class:
f.input :created_at, input_html: { class: "default-select" }
If you don't want all the select controls wrapped by slim select, you can change the default behavior setting as "default"
the default_select
option in the initializer.
ActiveadminAddons.setup do |config|
config.default_select = "default"
end
Now, if you want to enable Slim Select for a single control, you can add the "slim-select"
class:
f.input :created_at, input_html: { class: ""slim-select" }
tags
: (optional) boolean option, by default it'sfalse
. Iftrue
, it allows dynamic option creation as described here. It will also add the input's initial value to the select options if it's not in the supplied collection. Note that, unlike thetags_input
, this does not allow multiple values. Only available for form inputs, not filters.