Class: Ruflet::UI::Controls::RufletComponents::DataCellControl
- Defined in:
- lib/ruflet_ui/ruflet/ui/controls/materials/datacell_control.rb
Constant Summary collapse
- TYPE =
"datacell".freeze
- WIRE =
"DataCell".freeze
Constants inherited from Control
Instance Attribute Summary
Attributes inherited from Control
#children, #id, #props, #runtime_page, #type, #wire_id
Instance Method Summary collapse
-
#initialize(id: nil, badge: nil, col: nil, content: nil, data: nil, disabled: nil, expand: nil, expand_loose: nil, key: nil, opacity: nil, placeholder: nil, rtl: nil, show_edit_icon: nil, tooltip: nil, visible: nil, on_double_tap: nil, on_long_press: nil, on_tap: nil, on_tap_cancel: nil, on_tap_down: nil) ⇒ DataCellControl
constructor
A new instance of DataCellControl.
Methods inherited from Control
#emit, generate_id, #has_handler?, #on, #to_patch
Constructor Details
#initialize(id: nil, badge: nil, col: nil, content: nil, data: nil, disabled: nil, expand: nil, expand_loose: nil, key: nil, opacity: nil, placeholder: nil, rtl: nil, show_edit_icon: nil, tooltip: nil, visible: nil, on_double_tap: nil, on_long_press: nil, on_tap: nil, on_tap_cancel: nil, on_tap_down: nil) ⇒ DataCellControl
Returns a new instance of DataCellControl.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/ruflet_ui/ruflet/ui/controls/materials/datacell_control.rb', line 11 def initialize(id: nil, badge: nil, col: nil, content: nil, data: nil, disabled: nil, expand: nil, expand_loose: nil, key: nil, opacity: nil, placeholder: nil, rtl: nil, show_edit_icon: nil, tooltip: nil, visible: nil, on_double_tap: nil, on_long_press: nil, on_tap: nil, on_tap_cancel: nil, on_tap_down: nil) if content.nil? || (content.respond_to?(:props) && content.props["visible"] == false) raise ArgumentError, "data_cell requires visible content" end props = {} props[:badge] = badge unless badge.nil? props[:col] = col unless col.nil? props[:content] = content unless content.nil? props[:data] = data unless data.nil? props[:disabled] = disabled unless disabled.nil? props[:expand] = unless .nil? props[:expand_loose] = unless .nil? props[:key] = key unless key.nil? props[:opacity] = opacity unless opacity.nil? props[:placeholder] = placeholder unless placeholder.nil? props[:rtl] = rtl unless rtl.nil? props[:show_edit_icon] = show_edit_icon unless show_edit_icon.nil? props[:tooltip] = tooltip unless tooltip.nil? props[:visible] = visible unless visible.nil? props[:on_double_tap] = on_double_tap unless on_double_tap.nil? props[:on_long_press] = on_long_press unless on_long_press.nil? props[:on_tap] = on_tap unless on_tap.nil? props[:on_tap_cancel] = on_tap_cancel unless on_tap_cancel.nil? props[:on_tap_down] = on_tap_down unless on_tap_down.nil? super(type: TYPE, id: id, **props) end |