Skip to content

Commit a37bcc5

Browse files
committed
step 1 in fixing #62
1 parent 302d4c0 commit a37bcc5

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

ruby/hyper-component/lib/hyperstack/ext/component/element.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ def self.[](selector)
4545
Element.expose :mount_components
4646
end
4747

48-
DOM = Element
48+
JQ = Element

ruby/hyper-component/lib/hyperstack/internal/component/instance_methods.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ def dom_node
2727
`ReactDOM.findDOMNode(#{self}.__hyperstack_component_native)` # react >= v0.15.0
2828
end
2929

30+
def jq_node
31+
::Element[dom_node]
32+
end
33+
3034
def mounted?
3135
`(#{self}.__hyperstack_component_is_mounted === undefined) ? false : #{self}.__hyperstack_component_is_mounted`
3236
end

ruby/hyper-component/lib/hyperstack/internal/component/react_wrapper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def self.convert_props(args)
261261
}
262262
}
263263

264-
elsif key == 'dom'
264+
elsif key == 'jq_ref'
265265
unless value.respond_to?(:call)
266266
raise "The ref and dom params must be given a Proc.\n"\
267267
"If you want to capture the dom node in an instance variable use the `set` method.\n"\

0 commit comments

Comments
 (0)