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
- #created ⇒ Object
-
#options(value) ⇒ Object
bool :csvMode.
- #searchable(value) ⇒ Object
Methods inherited from AbstractField
#autoValidate, #context, #default_url_options, #determine_value, #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.
198 199 200 |
# File 'app/helpers/glib/json_ui/view_builder/fields.rb', line 198 def @_options end |
Instance Method Details
#created ⇒ Object
222 223 224 225 226 227 228 229 |
# File 'app/helpers/glib/json_ui/view_builder/fields.rb', line 222 def created super if @searchable.nil? @searchable = .size >= 10 end json.set! 'searchable', @searchable end |
#options(value) ⇒ Object
bool :csvMode
213 214 215 216 |
# File 'app/helpers/glib/json_ui/view_builder/fields.rb', line 213 def (value) @_options = value json.set! 'options', value&.to_a end |
#searchable(value) ⇒ Object
218 219 220 |
# File 'app/helpers/glib/json_ui/view_builder/fields.rb', line 218 def searchable(value) @searchable = value end |