File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 2
2
(:require [om.core :as om :include-macros true ]
3
3
[schema.core :as s :include-macros true ]
4
4
[sablono.core :refer-macros [html]]
5
- [om-widgets.utils :as utils]))
5
+ [om-widgets.utils :as utils :refer [->seq] ]))
6
6
7
7
8
8
(defn- checked?
31
31
:checked (checked? (utils/om-get app path) checked-value)
32
32
:onChange (fn [e]
33
33
(let [value (if (.. e -target -checked) checked-value unchecked-value)
34
- dest (get @(om/get-props owner) path)]
34
+ dest (get-in @(om/get-props owner) ( ->seq path) )]
35
35
36
36
(if toggle-value
37
37
(if (contains? dest checked-value)
Original file line number Diff line number Diff line change 7
7
[cljs-time.format :as timef]))
8
8
9
9
10
+ (defn ->seq
11
+ " Ensures key is a sequence suitable for using with get-in"
12
+ [path-or-key]
13
+ (if (sequential? path-or-key)
14
+ path-or-key
15
+ [path-or-key]))
16
+
10
17
(defn make-childs
11
18
" Build all alternative for sablono"
12
19
[tag & childs]
You can’t perform that action at this time.
0 commit comments