This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-28
Channels
- # aleph (16)
- # announcements (7)
- # asami (4)
- # aws (26)
- # babashka (26)
- # babashka-sci-dev (50)
- # beginners (118)
- # biff (7)
- # calva (15)
- # cider (6)
- # clj-kondo (8)
- # cljs-experience (3)
- # clojure (30)
- # clojure-austin (26)
- # clojure-europe (20)
- # clojure-france (2)
- # clojure-ireland (1)
- # clojure-nl (3)
- # clojure-norway (2)
- # clojure-spec (7)
- # clojure-uk (6)
- # clojurescript (12)
- # community-development (5)
- # conjure (1)
- # copenhagen-clojurians (3)
- # core-typed (71)
- # cursive (3)
- # datomic (1)
- # emacs (4)
- # fulcro (2)
- # helix (2)
- # introduce-yourself (3)
- # jobs (1)
- # london-clojurians (6)
- # lsp (122)
- # malli (2)
- # missionary (5)
- # overtone (14)
- # pathom (4)
- # polylith (1)
- # reagent (4)
- # reitit (1)
- # releases (1)
- # shadow-cljs (80)
- # testing (10)
- # tools-deps (6)
- # vim (3)
- # xtdb (19)
Hello! I need a hint regarding reagent, initial-values and state. I have a select item which gets populated from a database with users (using a for loop generating the hiccup). After initialization it shows the first user which is standard behavior, however this user is not represented in the state r/atom as the selected user. This happens via :on-change once a user is actively selected. Can I call the :on-change function with the initially displayed value? Maybe there is a completely different approach to this kind of problem? Thanks!
Yeah, that seems possible. I was just wondering if there is another solution. It seemed weird to set the ratom which is supposed to be set by a gui element manually. In case something happens this "correct" value is for whatever reason might not be the value the select object is actually showing. Probably that's just me overcomplicating things :)