class UiBibz::Ui::Core::Forms::Selects::MultiColumnField
Create a MultiColumnField
This element is an extend of UiBibz::Ui::Core::Component
.
Attributes¶ ↑
-
content
- Content of element -
options
- Options of element -
html_options
- Html Options of element
Options¶ ↑
You can add HTML attributes using the html_options
. You can pass arguments in options attribute:
-
option_tags
- Array, Object [required] -
selectable_opt_group
- Boolean -
searchable
- Boolean -
connect
- Hash-
event
- String -
mode
- String -
target
- Hash-
selector
- String -
data
- Array -
url
- String
-
-
Signatures¶ ↑
UiBibz::Ui::Core::Forms::Selects::MultiColumnField.new(content, options = {}, html_options = {}).render UiBibz::Ui::Core::Forms::Selects::MultiColumnField.new(options = {}, html_options = {}) do content end.render
Examples¶ ↑
UiBibz::Ui::Core::Forms::Selects::MultiColumnField.new('fruits', { option_tags: list_of_fruits, searchable: true }, { class: 'test' }) UiBibz::Ui::Core::Forms::Selects::MultiColumnField.new({ option_tags: list_of_fruits, selectable_opt_group: true }, { class: 'test' }) do 'fruits' end
Helper¶ ↑
multi_column_field(content, options = {}, html_options = {})
Private Instance Methods
component_html_classes()
click to toggle source
Calls superclass method
UiBibz::Ui::Core::Component#component_html_classes
# File lib/ui_bibz/ui/core/forms/selects/multi_column_field.rb, line 60 def component_html_classes super << 'multi-column-field' end
component_html_data()
click to toggle source
See UiBibz::Ui::Core::Component.initialize
Calls superclass method
UiBibz::Ui::Core::Component#component_html_data
# File lib/ui_bibz/ui/core/forms/selects/multi_column_field.rb, line 54 def component_html_data super searchable selectable_opt_group end
component_html_options()
click to toggle source
Calls superclass method
UiBibz::Ui::Core::Forms::Selects::AbstractSelect#component_html_options
# File lib/ui_bibz/ui/core/forms/selects/multi_column_field.rb, line 64 def component_html_options super.merge({ multiple: true, disabled: options[:state] == :disabled, include_blank: options[:include_blank], prompt: options[:prompt] }) end
searchable()
click to toggle source
# File lib/ui_bibz/ui/core/forms/selects/multi_column_field.rb, line 73 def searchable add_html_data('searchable') if options[:searchable] end
selectable_opt_group()
click to toggle source
# File lib/ui_bibz/ui/core/forms/selects/multi_column_field.rb, line 77 def selectable_opt_group add_html_data('selectable_optgroup') if options[:selectable_opt_group] end
status()
click to toggle source
# File lib/ui_bibz/ui/core/forms/selects/multi_column_field.rb, line 81 def status "has-#{options[:status]}" if options[:status] end