Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"No queries exist for component path" #658

Closed
haywoood opened this issue Mar 19, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@haywoood
Copy link

commented Mar 19, 2016

I've run into this issue with two of my toy projects, on versions alpha22 and the latest. The problem happens when I want to set the :selected value in state to the ref of the thing that was clicked. After the mutation runs and successfully updates state, something happens and I can't for the life of me figure out what the issue is.

I've created the simplest app possible to reproduce the error here: https://gist.github.com/lsdafjklsd/1c066f38e90ab4ea0e43

When you click an item in the number list, you'll get an error.

Here's what the state atom looks like after the mutation runs:

{:numbers/selected [:number/by-id 1],
 :numbers/list
 [[:number/by-id 1]
  [:number/by-id 5]
  [:number/by-id 8]
  [:number/by-id 9]],
 :number/by-id
 {1 {:id 1, :name "one"},
  5 {:id 5, :name "five"},
  8 {:id 8, :name "eight"}, 
  9 {:id 9, :name "nine"}}}

And a screenshot of the error:
image

I apologize if this is totally not the space for this question, but appreciate any help in advance.

@IwanKaramazow

This comment has been minimized.

Copy link

commented Mar 19, 2016

Can't reproduce the problem on the latest alpha. Aside from the fact you forgot STATIC om/Ident & STATIC om/IQuery, everything seems to work properly.

@haywoood

This comment has been minimized.

Copy link
Author

commented Mar 19, 2016

Interesting, I'm assuming the latest is alpha31 I've pushed the repo here https://github.com/lsdafjklsd/my-omnext-issue. What version of Clojurescript are you running?

edit: After adding static to the query / ident methods I'm not longer getting the error. Going to go back to my other projects and see what the discrepancy is

@IwanKaramazow

This comment has been minimized.

Copy link

commented Mar 19, 2016

I cloned your repo and submitted a pull request which makes om/Ident & om/IQuery static. Aside from that, everything runs just fine.

Don't think there's any problem with Om here.

@haywoood

This comment has been minimized.

Copy link
Author

commented Mar 19, 2016

Yes, and I've fixed the issue in one of the other projects. Thanks for your help!

@haywoood haywoood closed this Mar 19, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.