Skip to content
Source
Sign inSign up
TanStack/query

DevTools work only when shadowDOM is `open` #7784

Send to my agent
Closedfdw(GitHub profile, opens in a new tab) opened this issue 3 comments

Describe the bug

I'm using Tanstack Query in a webcomponent, with this.attachShadow({ mode: 'closed' }). When I then add the dev tools, they do show up and I can see queries, but almost everything is non-interactive. I can only switch between queries and mutations. The buttons do not work, nor can I open details about a query.

After some testing, it seems to work better with mode: 'open'. Almost everything now works, except the settings (?).

Your minimal, reproducible example

https://stackblitz.com/edit/github-ifjxaf?file=src%2Fmain.tsx

Steps to reproduce

  1. Create a shadow DOM with mode: closed
  2. Add React dev tools
  3. Try to click a button or anything

Expected behavior

I'd expect the dev tools to react to my input, but they don't

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

  • Browser: Firefox

Tanstack Query adapter

react-query

TanStack Query version

5.51.11

TypeScript version

5.5.3

Additional context

No response

  1. TkDodo added labelspackage: query-devtools

  2. if you want, please investigate the issue and propose a fix. I don't know enough about shadowDOM 😅

  3. TkDodo added labelshelp wanted

  4. I've dug a bit, and it seems you use solid.js for the devtools. Unfortunately, they seem to have a problem with closed shadow DOM and don't intend to fix it: https://github.com/solidjs/solid/issues/1891

  5. thanks, then I'll close this as an upstream issue.

  6. TkDodo closed this

  7. TkDodo removed labelshelp wanted

  8. TkDodo added labelswontfix

  9. TkDodo added labelsupstream

Sign in to join this conversation.