Fork me on GitHub
#fulcro
<
2019-02-25
>
thheller17:02:40

@tony.kay I think you did some routing work recently. I wonder if this would make your life easier: https://clojureverse.org/t/shadow-lazy-convenience-wrapper-for-shadow-loader-cljs-loader/3841

tony.kay18:02:55

Looks nice. I’m not providing code splitting support directly (beyond giving hooks that make it possible for routing to work with it), but I’m sure users will appreciate the simpler support.

exit218:02:14

@tony.kay after your help with the form, I’m trying to figure out how to tie the inputs together, seems just passing the prop of the form value isn’t work - should I be passing something else? The value is correct, but errors out on change.

exit218:02:17

(defsc DetailsForm [this props]
  {:query (fn [] ['* fs/form-config-join])
   :ident (fn [] (generate-ident props))}
  (dom/div "Details Form"
           (dom/input {:value (:total props) :onChange #(m/set-string! this (:total props) :event %)})))

tony.kay18:02:38

your set-string! is wrong

tony.kay18:02:54

(set-string! this :total :event %)

exit219:02:28

This is getting me closer, but React still seems angry. Warning: value prop on input should not be null. Consider using the empty string to clear the component or undefined for uncontrolled components. and wrapped-input is changing a controlled input of type undefined to be uncontrolled. Input elements should not switch from controlled to uncontrolled (or vice versa

exit220:02:46

@tony.kay Strangely enough this only happens on the first onChange, and going into the next step and back shows initial state.

exit221:02:54

@tony.kay I’m starting to this has to do w/ the booking/id being nil

tony.kay21:02:46

that warning is that your :value on an input went from nil to non-nil….good idea just to say something like :value (or x "") if you don’t want to see the warning

tony.kay21:02:52

that is just a React thing

exit221:02:16

Oh I see, any idea why its not maintaining the value of the field after editing and going to the next step? Or do I need to do a mutation to update it on step change?

exit221:02:26

Ah interesting once I added the recommendation above it clears out the field onChange

exit222:02:02

I think it all boils down to this:

(defn generate-ident [{:keys [booking]}]
  [:booking/id (:id booking)])
Something isn’t lining up correctly

exit222:02:25

confirmed, the props passed into this are changing into fulcro.client.primitives{:computed {:step 1}} onChange @tony.kay Any ideas?

tony.kay23:02:24

um…the props refresh relies on the query of the component that the system has mounted at that location…do all of the components in question have queries for the props you’re trying to use?

tony.kay23:02:25

I may have led you down a shady path. The way Fulcro refreshes UI has to do with it finding the portion of the UI that needs refreshed and using the component at that path to pull the props…I honestly don’t remember how it selects the query off the top of my head…I think it uses the component that is in the query. Thus, whichever component does the query should query for all of the possible props…this subbing out stuff I’m having you do might not end up working right with the sub-components having queries…you might need to delete the ident/query for the steps and just treat them more like rendering functions. I’m sorry I’m just a bit too busy to help you more than that.

souenzzo21:02:34

I'm once again with that strange No app connected. in fulcro inspect debugging the inspect window i found Extension server error: Operation failed: has no execution context It keep retrying (and failing) forever There is also a Uncaught TypeError: Cannot read property 'dispatchMessage' of undefined

souenzzo21:02:56

Uncaught TypeError: Cannot read property 'dispatchMessage' of undefined

devtools_compatibility.js:57 Uncaught TypeError: Cannot read property 'dispatchMessage' of undefined
    at DevToolsAPIImpl._dispatchOnInspectorFrontendAPI (VM1369 devtools_compatibility.js:57)
    at DevToolsAPIImpl.dispatchMessage (VM1369 devtools_compatibility.js:134)
    at <anonymous>:1:13
_dispatchOnInspectorFrontendAPI	@	devtools_compatibility.js:57
dispatchMessage	@	devtools_compatibility.js:134
(anonymous)	@	VM1371:1

souenzzo21:02:11

Extension server error: Operation failed: has no execution context

Extension server error: Operation failed:  has no execution context
makeStatus @ shell.js:7831
evaluate @ shell.js:7827
_onEvaluateOnInspectedPage @ shell.js:7744
_onmessage @ shell.js:7796

wilkerlucio03:02:09

try reinstalling it, I have seen some cases were the code get corrupted for no aparent reason