Class: Glib::JsonUi::ViewBuilder::Fields::Select
- Inherits:
-
AbstractField
- Object
- JsonUiElement
- View
- AbstractField
- Glib::JsonUi::ViewBuilder::Fields::Select
- Defined in:
- app/helpers/glib/json_ui/view_builder/fields.rb
Instance Attribute Summary collapse
-
#_options ⇒ Object
readonly
Returns the value of attribute _options.
Attributes inherited from JsonUiElement
Instance Method Summary collapse
Methods inherited from AbstractField
#autoValidate, #context, #default_url_options, #determine_value, #disableDirtyCheck, #hint, #hint_args, #label, #label_args, #name, #placeholder, #placeholder_args, #prop, #validation, #value
Methods inherited from View
Methods inherited from JsonUiElement
action, any, array, badgeable, bool, color, component_name, date, date_time, enum, float, hash, icon, #initialize, int, length, menu, panels_builder, #props, required, singleton_array, string, text, url, views
Constructor Details
This class inherits a constructor from Glib::JsonUi::JsonUiElement
Instance Attribute Details
#_options ⇒ Object (readonly)
Returns the value of attribute _options.
573 574 575 |
# File 'app/helpers/glib/json_ui/view_builder/fields.rb', line 573 def @_options end |
Instance Method Details
#created ⇒ Object
600 601 602 603 604 605 606 607 |
# File 'app/helpers/glib/json_ui/view_builder/fields.rb', line 600 def created super if @searchable.nil? @searchable = .size >= 10 end json.set! 'searchable', @searchable end |
#options(value) ⇒ Object
591 592 593 594 |
# File 'app/helpers/glib/json_ui/view_builder/fields.rb', line 591 def (value) @_options = value json.set! 'options', value&.to_a end |
#searchable(value) ⇒ Object
596 597 598 |
# File 'app/helpers/glib/json_ui/view_builder/fields.rb', line 596 def searchable(value) @searchable = value end |