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
Constructor Details
This class inherits a constructor from Glib::JsonUi::JsonUiElement
Instance Attribute Details
#_options ⇒ Object (readonly)
Returns the value of attribute _options.
237 238 239 |
# File 'app/helpers/glib/json_ui/view_builder/fields.rb', line 237 def end |
Instance Method Details
#created ⇒ Object
263 264 265 266 267 268 269 270 |
# File 'app/helpers/glib/json_ui/view_builder/fields.rb', line 263 def created super if @searchable.nil? @searchable = .size >= 10 end json.set! 'searchable', @searchable end |
#options(value) ⇒ Object
254 255 256 257 |
# File 'app/helpers/glib/json_ui/view_builder/fields.rb', line 254 def (value) = value json.set! 'options', value&.to_a end |
#searchable(value) ⇒ Object
259 260 261 |
# File 'app/helpers/glib/json_ui/view_builder/fields.rb', line 259 def searchable(value) @searchable = value end |