how to setup for form:
options?
#134
-
how to setup for
a vanilla combobox code would be looks like this
I also wish there is a simple way to send class value to the input element instead forcing to override all the default class from the library |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @joyoy96 This is not documented yet but it's implemented as follows: <%= combobox_tag "state", State.all, label: "state" do |combobox| %>
<% combobox.customize_fieldset class: "custom-class--fieldset", data: { customized_fieldset: "" } %>
<% combobox.customize_label class: "custom-class--label", data: { customized_label: "" } %>
<% combobox.customize_hidden_field class: "custom-class--hidden_field", data: { customized_hidden_field: "" } %>
<% combobox.customize_main_wrapper class: "custom-class--main_wrapper", data: { customized_main_wrapper: "" } %>
<% combobox.customize_input class: "custom-class--input", data: { customized_input: "" } %>
<% combobox.customize_handle class: "custom-class--handle", data: { customized_handle: "" } %>
<% combobox.customize_listbox class: "custom-class--listbox", data: { customized_listbox: "" } %>
<% combobox.customize_dialog class: "custom-class--dialog", data: { customized_dialog: "" } %>
<% combobox.customize_dialog_wrapper class: "custom-class--dialog_wrapper", data: { customized_dialog_wrapper: "" } %>
<% combobox.customize_dialog_label class: "custom-class--dialog_label", data: { customized_dialog_label: "" } %>
<% combobox.customize_dialog_input class: "custom-class--dialog_input", data: { customized_dialog_input: "" } %>
<% combobox.customize_dialog_listbox class: "custom-class--dialog_listbox", data: { customized_dialog_listbox: "" } %>
<% end %> This example shows <% combobox.customize_hidden_field form: dom_id(posting, :form) %> The only element that doesn't support this yet is options but I think we'll implement that at some point. Let me know if you have any questions. Thanks! |
Beta Was this translation helpful? Give feedback.
Hey @joyoy96
This is not documented yet but it's implemented as follows: