Skip to content

Commit 63ddb9f

Browse files
committed
remove om cursor capture
1 parent 252eabf commit 63ddb9f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(defproject org.clojars.intception/om-widgets "0.3.21"
1+
(defproject org.clojars.intception/om-widgets "0.3.22"
22
:description "Widgets for OM/React"
33
:url "https://github.com/orgs/intception/"
44
:license {:name "Eclipse Public License"

‎src/om_widgets/dropdown.cljs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
(defmulti build-entry (fn [entry app] (:type entry)))
1616

1717
(defmethod build-entry :entry
18-
[entry app]
18+
[entry owner]
1919
(reify
2020
om/IRenderState
2121
(render-state [this {:keys [channel] :as state}]
@@ -24,7 +24,7 @@
2424
;; onClick event, we use onBlur to close the dropdown
2525
[:li (->> {:class (when (:disabled entry) "disabled")}
2626
(merge (when-not (:disabled entry)
27-
{:onMouseDown #(let [e (if (om/cursor? entry) @entry entry)]
27+
{:onMouseDown #(let [e (if (om/cursor? entry) (om/get-props owner) entry)]
2828
(put! (:channel state) {:type :close-dropdown})
2929
(put! channel {:type :entry-click
3030
:value (:id e)

0 commit comments

Comments
 (0)