This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-31
Channels
- # arachne (4)
- # beginners (21)
- # boot (36)
- # cider (59)
- # cljsrn (8)
- # clojure (260)
- # clojure-filipino (3)
- # clojure-greece (3)
- # clojure-italy (15)
- # clojure-russia (58)
- # clojure-spec (54)
- # clojure-uk (99)
- # clojureremote (5)
- # clojurescript (65)
- # core-matrix (1)
- # cursive (17)
- # data-science (9)
- # datascript (7)
- # datomic (33)
- # emacs (8)
- # hoplon (2)
- # jobs (1)
- # jobs-discuss (2)
- # lein-figwheel (2)
- # lumo (2)
- # numerical-computing (1)
- # off-topic (22)
- # om (78)
- # onyx (17)
- # parinfer (3)
- # pedestal (5)
- # perun (1)
- # powderkeg (19)
- # protorepl (37)
- # re-frame (3)
- # rum (2)
- # spacemacs (1)
- # uncomplicate (8)
- # unrepl (78)
- # untangled (29)
- # yada (41)
Do I understand the idea of the forms portion of the untangled-ui library correctly? Basically, a form targets some entity in the app-db, so that values entered into the form component are committed to that entity
We laughed our asses off
I have a defui component without render that declares the query, ident and initialAppState for an entity in the app-db
Then there are supposed to be a bunch of other components which are forms that edit entities of this type
Ok... so it was my error that it wasn't working. Called the wrong query. Still, did I stumble upon the correct
solution. If I want to initialize an entity in the initial state, that multiple components will render and edit, I declare it's query, ident and initial-state in a defui
I compose its initial state and query into their initial states and queries. To make it all the same entity, I give the Entity component a default id, so that get-initial-state always yields the same entity, even if called on many components
Yes, the form keeps an alternate state for the entity. When you commit it, it copies it over. It also supports sending the delta remotely
@mitchelkuijpers @fatihict Glad you guys enjoyed it. If you haven't seen "The Doctor" Kids in the Hall sketch, you should watch it...it's kinda older, and no one got that one at all
Ahhh, now I see. I didn't get that one either, but that's hilarious 😃. Also the ending about the cake was cruel 🍰😆
@tony.kay The guide cleared up a lot... there's still a question forming, but it isn't quite ready 🙂
when calling f/form-field
is it possible to specify attributes of the resulting input? For instance, to add a call to commit onBlur? I see that I can pass things like :className to f/text-input
in IForm
, but is there a way to do it dynamically?
Yes, so apparently the entity ended up in the database because the other view in the join query didn't yet implement form. So a component with just a form did not even create the actual entity that the form was supposed to augment. So I must be missing something.
All the examples in the guide some to be such that entity IS the form... so where is it committing if there isn't an unaugmented version of the entity in the app-db?