This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-15
Channels
- # beginners (56)
- # boot (4)
- # cider (22)
- # clara (10)
- # cljs-dev (50)
- # cljsrn (27)
- # clojure (27)
- # clojure-conj (4)
- # clojure-dev (3)
- # clojure-italy (17)
- # clojure-nl (12)
- # clojure-norway (3)
- # clojure-spec (10)
- # clojure-uk (137)
- # clojurescript (132)
- # cursive (4)
- # datascript (2)
- # datomic (109)
- # devcards (2)
- # editors (1)
- # emacs (4)
- # euroclojure (2)
- # events (4)
- # figwheel (1)
- # fulcro (15)
- # jobs (1)
- # jobs-discuss (4)
- # juxt (3)
- # leiningen (2)
- # off-topic (21)
- # onyx (13)
- # other-languages (8)
- # pedestal (6)
- # re-frame (22)
- # reagent (5)
- # reitit (1)
- # ring-swagger (3)
- # shadow-cljs (75)
- # sql (6)
- # tools-deps (2)
- # vim (1)
- # yada (8)
@currentoor https://github.com/fulcrologic/fulcro/blob/develop/DevelopersGuide.adoc
@chrisjswanson I remember I'd the same problem when using semantic-ui-react with reagent and I fell back to bootstrap input.
Is there a specific reason why the key for a fulcro-form (`:fulcro.ui.forms/form`) is not prefixed with ui
? So that it won't be passed to the remote?
@hugh.jf.chen Yea, I was about to go that way too. As it turns out, I realized, I don't actually need to use a controlled input. If I just use "defaultValue" instead of "value", I can still keep the contents of the text field tied to the value in the app db. Because whenever a key is pressed I trigger a mutation of app db for the field, and the component's subscription will then cause a render. I still don't really understand why this works while a "true" controlled input has the cursor bug. But for anyone with the same situation, maybe just changing to use "defaultValue" will help.
@timovanderkamp Just trying to keep it from conflicting with other parameter names by using FQ namespace. You point about the remote it an oversight 😕
@tony.kay i noticed that the initialized form was removed after a second load, because the form key was queried but returned nil. Thats why I was asking. It can easily be prevented though by using the without
load-paramater
@timovanderkamp Technically you should re-initialize the form after a load, since the "saved" pristine state is wrong
Ye that is also what i thought about after asking this question
Thanks for the clarification
whats going on here?
18 | (defsc Transaction [this {:keys [txn/amount]}]
-------^------------------------------------------------------------------------
{:cause #error {
:cause "Invalid arguments"
:data {:reason "[] is invalid."}
:via
[{:type clojure.lang.ExceptionInfo
:message "Invalid arguments"
:data {:reason "[] is invalid."}
:at [clojure.core$ex_info invokeStatic "core.clj" 4739]}]
@afhammad what does the rest of your defsc
look like? There's not enough in that error msg to tell
(defsc Transaction [this {:keys [txn/amount]}]
{ :query [:txn/id :txn/amount]
:initial-state (fn [params] {:txn/id (:id params) :txn/amount (:amount params)})
:ident [:txn/by-id]}
(dom/li
(dom/div txn/amount)))
my first go at fulcro, and haven’t touched clojure in a while, please point out if anything looks silly
@chrisjswanson I had opened a report to semantic-ui-react but they think the component works expected and close my report immediately