This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-25
Channels
- # announcements (6)
- # babashka (53)
- # beginners (199)
- # calva (101)
- # cider (8)
- # clara (17)
- # cljs-dev (1)
- # clojure (86)
- # clojure-australia (1)
- # clojure-dev (33)
- # clojure-europe (29)
- # clojure-france (13)
- # clojure-nl (6)
- # clojure-norway (7)
- # clojure-poland (3)
- # clojure-spec (2)
- # clojure-uk (9)
- # clojurescript (18)
- # community-development (2)
- # cursive (2)
- # datomic (8)
- # duct (43)
- # emacs (9)
- # events (6)
- # figwheel-main (1)
- # fulcro (7)
- # integrant (1)
- # jobs (1)
- # jobs-rus (1)
- # lambdaisland (1)
- # malli (19)
- # nrepl (2)
- # off-topic (31)
- # pathom (35)
- # quil (1)
- # reagent (4)
- # remote-jobs (7)
- # schema (1)
- # shadow-cljs (58)
- # spacemacs (6)
- # startup-in-a-month (12)
- # tools-deps (10)
- # xtdb (40)
hi, I am trying to use reagent-forms/bind-fields with react-semantic-ui but for some reason, it is not working. I know precisely how to make it work when using plain old hiccup to build my form, but not when using ui/Form here is my code:
(defn trainer-form []
(let [x [:div [:> ui/Form
[:> ui/Form.Input {:label "Firstname" :width 3 :id "firstname" :field :text}]
[:> ui/Form.Input {:label "Lastname" :width 3 :field :text :id :aaa}]
[:> ui/Form.Input {:label "IG Link" :width 3 :field :text :id :bbb}]
]]]
(fn [] [bind-fields x trainer])))
(defn my-trainer-form []
(fn []
[bind-fields [:div
[:input {:field :text :id :firstname}]
[:input {:field :text :id :lastname}]
[:input {:id :iglink :field :text}]] trainer]))
my-trainer-form works fine, but trainer-form does not.
now, my understanding is that ui/Form.Input fails to do the thing that :field :text in [:input {:field :text}] in hiccup does. would anyone have an idea how to fix this? thanksif I change my Form.Input to [:> Form.Field [:input {:field :text :id :firstname}]] it works fine