Class: Ferro::Combo::PullDownItems
- Inherits:
-
BaseElement
- Object
- BaseElement
- Ferro::Combo::PullDownItems
- Defined in:
- opal/opal-ferro/elements/ferro_combos.js.rb
Overview
Internal class for use with PullDown.
Constant Summary
Constants included from Elementary
Instance Attribute Summary
Attributes inherited from BaseElement
#children, #domtype, #element, #parent, #sym
Instance Method Summary collapse
-
#_before_create ⇒ Object
Internal method.
-
#cascade ⇒ Object
Internal method.
Methods inherited from BaseElement
#add_state, #add_states, #classify_state, #component, #dom_id, #factory, #get_text, #html, #initialize, #option_replace, #remove_attribute, #root, #router, #set_attribute, #set_text, #state_active?, #toggle_state, #update_state, #value, #value=
Methods included from Elementary
#_after_create, #_stylize, #add_child, #after_create, #before_create, #create, #creation, #destroy, #each_child, #forget_children, #method_missing, #remove_child, #style, #symbolize
Constructor Details
This class inherits a constructor from Ferro::BaseElement
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Ferro::Elementary
Instance Method Details
#_before_create ⇒ Object
Internal method.
116 117 118 119 120 |
# File 'opal/opal-ferro/elements/ferro_combos.js.rb', line 116 def _before_create @id = Sequence.new 'pdi_' @itemlist = option_replace :items, [] super end |
#cascade ⇒ Object
Internal method.
123 124 125 126 127 |
# File 'opal/opal-ferro/elements/ferro_combos.js.rb', line 123 def cascade @items = @itemlist.map do |item| add_child @id.next, item end end |