This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-10-24
Channels
- # boot (183)
- # business (3)
- # clojure (65)
- # clojure-argentina (1)
- # clojure-china (1)
- # clojure-conj (2)
- # clojure-japan (2)
- # clojure-russia (5)
- # clojure-ukraine (5)
- # clojurescript (139)
- # community-development (1)
- # core-async (8)
- # core-matrix (1)
- # cursive (7)
- # datomic (2)
- # events (4)
- # hoplon (108)
- # ldnproclodo (1)
- # lein-figwheel (1)
- # liberator (1)
- # off-topic (76)
- # om (37)
- # onyx (12)
- # overtone (1)
- # testing (8)
@dnolen in the remote sync tutorial, this is throwing an error: (p {:state app-state} (om/get-query Dashboard) :static) [Error Error: No item 1 in vector of length 1]
Can anyone help me? I would like to render ItemOne <OR> ItemTwo, based on the ":selected" ref of entity 0. https://gist.github.com/ThomasDeutsch/ec80942bca3270013032
will get this error: "No queries exist for component path (scheduler.main.core/Root scheduler.main.core/ItemTwo)"
when i try to switch items
@thomasdeutsch: just a bug, file an issue - we need to update the index if a new kind of component mounts
yes, i will file an issue
i've copy-pasted the code from https://github.com/omcljs/om/wiki/Queries-With-Unions up until Normalization, and (om/get-query Dashboard)
gives the expected result but (om/normalize Dashboard init-data true)
gives:
{:dashboard/items [[nil nil] [nil nil] [nil nil] [nil nil] [nil nil]],
nil {nil {}}}
i'm using the same deps as in Quick Start (i.e. alpha7, same figwheel, no devcards, etc), except that [datascript "0.13.1"]
is also in (used in a different ns). When debugging, it seems that DashboardItem’s ident gets an empty map as props.yes, works there, i may have messed something up from within a different namespace or something
small typo in https://github.com/omcljs/om/wiki/Queries-With-Unions under The Queries: (in-ns 'om.tutorial)
should be (in-ns 'om-tutorial.core)
@dnolen typo in union tutorial
in Photo render method
where it's (dom/p "Caption: ")
, it should read (dom/p nil "Caption: ")
@anmonteiro: fixed thanks
Hi, still have some confusion around params: Do the "params" of iQueryParams have anything to do with the concept of "params" in the parser or are those two separate things?
To give a concrete problem I'm trying to solve with params: I have a child that is a "dumb" list component, so I want it's parent to somehow tell it "here's the query selector you need to find out what items you need should display", and so it seems like I would specify this in the parent's iQuery result as a param, then the child list would "capture" that in its iQueryParams/iQuery logic to generate the pull in the correct items to display...
My understanding is that the IQueryParams is for binding parameters to the Query. The Query is then parsed with whatever is in its params. The docs say this: "This component defines om.next/IQueryParams along with om.next/IQuery. The params method should return a map of bindings. These will be used to replace any occurrences of ?some-var in the actual query."
OK, now that I've written out my question, I think my problem is that I'm thinking of iQuery functions as using "function composition" vis a vis child components. But instead, the correct way of thinking about it is DSL rewriting: If the list manager is "dumb" then the parent component can just rewrite the query selector of the list manager to pull in extra things
...sort of like in the "Query Union" example, the DataItem component rewrites the child query selectors to include ":friends"
@griffio: Yes, I think you are right- iQueryParams and the parser ":params" key are completely unrelated, except that they both embody the abstract notion of a "parameter"
The params in the IQueryParams is a function - so can drive some initial query criteria such as pagination.
OK, I think I need to sleep (am in Europe right now) because I clearly still have some confusion around this - Thanks for the pointers, @griffio!
@thosmos: Thanks for that snippet. I didn’t know about specter, and that is very sweet indeed
just cut Om 1.0.0-alpha8, fixes a subtle union bug found by @thomasdeutsch