om

Please ask the channel first, not @dnolen directly!
tony.kay 2017-08-18T06:04:40.000053Z

@briantrice I personally prefer working on components and portions of the UI in a devcard with :inspect-data true. This is also made a bit easier if you use the trick from Fulcro of InitialAppState co-located with components.

tony.kay 2017-08-18T06:05:20.000123Z

because then it is easy to factor the thing into pieces and embed them…well, in stock Om Next, the parser can make that a bit difficult I guess, unless you’re mostly using db->tree

2017-08-18T14:34:26.000634Z

is it possible to have completely dynamic queries with om.next? i need to calculate my query based on props

2017-08-18T14:34:48.000241Z

om/set-query! is close, except the parent component still causes the child to render without the query data

petterik 2017-08-18T14:50:11.000120Z

@cjhowe I tried and had a lot of problems with dynamic queries when starting out with om.next. What I tried to do was to use the this passed to om/IQuery (query [this]) to check if it's a component, get the props and do what I wanted. This approach never worked because of how the indexer worked at the time. Another thing I tried to do to get dynamic queries was om/set-query which, as you mentioned, has problems. What I recommend "dynamic queries" is to do union queries for all your cases and "choose" the join (or joins) in your union query depending on your app-state at read time.

briantrice 2017-08-18T16:38:05.000044Z

@tony.kay oh! I’m still new to this ecosystem and have only heard the word “devcard” and not gotten my lein cljsbuild to deliver them. I’ll see again

tony.kay 2017-08-18T18:45:14.000152Z

@briantrice So, try out the fulcro template at https://github.com/fulcrologic/fulcro-template. It’s a fully-working project that also includes devcards. Fulcro was renamed from Untangled, and there are some videos on the old name that demonstrate what I’m talking about. This on in particular should be of interest to you: https://youtu.be/uxI2XVgdDBU?list=PLVi9lDx-4C_T_gsmBQ_2gztvk6h_Usw6R

briantrice 2017-08-18T18:45:46.000244Z

oh! okay. I’ll make a checkout and tinker with it soon

eraserhd 2017-08-18T19:04:14.000628Z

I'm on om.next and having quite a bit of trouble with some Material UI text edit fields. Every edit moves the cursor to the end of the field. I found React issues about this, but, AFAICT, om.next prevents the React work-around.

eraserhd 2017-08-18T19:04:27.000284Z

Anyone know about this?

gardnervickers 2017-08-18T19:31:51.000418Z

@eraserhd Make sure you’re properly setting your react-key to avoid re-renders.

gardnervickers 2017-08-18T19:32:10.000043Z

Sounds like the backing component is being re-mounted on every keystroke.

eraserhd 2017-08-18T19:33:17.000349Z

The :key property, you mean?

eraserhd 2017-08-18T19:38:53.000170Z

This is definitely being set correctly. Just double-verified.

eraserhd 2017-08-18T19:40:25.000124Z

Here is the React issue: https://github.com/facebook/react/issues/955

eraserhd 2017-08-18T19:51:45.000235Z

If I use :defaultValue instead of :value, it works!