This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-18
Channels
- # aws (10)
- # beginners (43)
- # calva (1)
- # cider (7)
- # cljs-dev (83)
- # clojure (132)
- # clojure-dev (20)
- # clojure-europe (6)
- # clojure-greece (4)
- # clojure-italy (2)
- # clojure-nl (6)
- # clojure-spec (21)
- # clojure-sweden (16)
- # clojure-uk (21)
- # clojuredesign-podcast (16)
- # clojurescript (74)
- # cursive (41)
- # datomic (7)
- # emacs (3)
- # fulcro (30)
- # graalvm (3)
- # graphql (2)
- # instaparse (1)
- # jobs (1)
- # joker (13)
- # kaocha (14)
- # off-topic (118)
- # pathom (13)
- # re-frame (5)
- # reagent (22)
- # shadow-cljs (67)
- # spacemacs (7)
- # sydney (1)
- # testing (1)
- # tools-deps (82)
- # vim (4)
- # xtdb (1)
[mui/form-control
[mui/radio-group
[radio {
:value "red"
:label "Red pill"}]
[radio {
:value "blue"
:label "Blue pill"}]]]
[mui/radio-group
(radio {
:value "red"
:label "Red pill"})
(radio {
:value "blue"
:label "Blue pill"})]
When I use [radio ...]
it doesn’t work in the meaning I can check 2 radio buttons at once.
Full example
(defn radio [{:keys [form spec->msg]} {:keys [name label value] :as parameters}]
[mui/form-control-label
{#_#_:name name
:value value
:control (r/as-element
[mui/radio
#_(merge
#_{:on-change (partial fv/event->names->value! form)
:color "default"}
(-> (dissoc parameters :label)
(dissoc parameters :name)))])
:label label
#_#_:class (when (fv/?show-message form name) "error")}])
which is wrapped by
let [radio (partial util/radio {:form form
:spec->msg spec->msg})]
And this radio above is used below
[mui/form-control
[mui/radio-group
(radio {
:value "red"
:label "Red pill"})
(radio {
:value "blue"
:label "Blue pill"})]]
@kwladyka What material-ui version are you using?
Hmh, should work. Some components presume the children to be certain Component classes, so Reagent throws them off as it creates it's own components, but radio-group uses Context so it should matter if there are some extra components between radio-group and radio.
I'm doing some reactify-component
-> HOC
-> adapt-react-class
magic and thinking that might be screwing it up
hmm, I think it's this issue I'm hitting; https://github.com/reagent-project/reagent/issues/389