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

[Bug]: Injection Symbol(SidebarContext) not found. Component must be used within Sidebar #882

Open
2 tasks
DanielSBoba opened this issue Nov 10, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@DanielSBoba
Copy link

Reproduction

https://codesandbox.io/p/devbox/cranky-rhodes-hms3pk?workspaceId=87418a45-b88e-427a-85aa-d226284d3610

Describe the bug

gives

Injection Symbol(SidebarContext) not found. Component must be used within Sidebar

System Info

Windows, Brave

Contributes

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests
@DanielSBoba DanielSBoba added the bug Something isn't working label Nov 10, 2024
@DreKwasi
Copy link

DreKwasi commented Nov 11, 2024

@DanielSBoba faced the same issue. Wrap your component with SidebarProvider. This should fix the issue

@Soviut
Copy link

Soviut commented Nov 18, 2024

The error message should really spell this out.

@DreKwasi
Copy link

If you understand a bit of React you can peep at the original ShadCN docs. Explains everything including the props and hooks(in Vue's case composables)

@Soviut
Copy link

Soviut commented Nov 18, 2024

@DreKwasi That's not very helpful. Needing to reference another project's docs is not how we solve this problem. Updating the docs here and improving the error message so that it clearly states that the SidebarProvider is missing is what's needed.

@DreKwasi
Copy link

Agreed. It's just a temporary approach till this project's maintainers make the updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants