@@ -16,7 +16,11 @@ import {
1616 Select ,
1717} from './styledComponents'
1818import { ThemeProvider } from './theme'
19- import { getQueryStatusLabel , getQueryStatusColor } from './utils'
19+ import {
20+ getQueryStatusLabel ,
21+ getQueryStatusColor ,
22+ getQueryOpacity ,
23+ } from './utils'
2024import Explorer from './Explorer'
2125import Logo from './Logo'
2226
@@ -171,8 +175,7 @@ const sortFns = {
171175
172176export const ReactQueryDevtoolsPanel = React . forwardRef (
173177 function ReactQueryDevtoolsPanel ( props , ref ) {
174-
175- const queryCache = useQueryCache ? useQueryCache ( ) : cache ;
178+ const queryCache = useQueryCache ? useQueryCache ( ) : cache
176179
177180 const [ sort , setSort ] = useLocalStorage (
178181 'reactQueryDevtoolsSortFn' ,
@@ -217,7 +220,13 @@ export const ReactQueryDevtoolsPanel = React.forwardRef(
217220
218221 return [
219222 activeQuery ,
220- activeQuery ? JSON . parse ( JSON . stringify ( activeQuery , ( key , value ) => key === 'cache' ? undefined : value ) ) : null ,
223+ activeQuery
224+ ? JSON . parse (
225+ JSON . stringify ( activeQuery , ( key , value ) =>
226+ key === 'cache' ? undefined : value
227+ )
228+ )
229+ : null ,
221230 ]
222231 } , [ activeQueryHash , queries ] )
223232
@@ -236,7 +245,7 @@ export const ReactQueryDevtoolsPanel = React.forwardRef(
236245 return queryCache . subscribe ( queryCache => {
237246 setUnsortedQueries ( Object . values ( queryCache . queries ) )
238247 } )
239- } , [ sort , sortFn , sortDesc ] )
248+ } , [ sort , sortFn , sortDesc , queryCache ] )
240249
241250 React . useEffect ( ( ) => {
242251 if ( activeQueryHash && ! activeQuery ) {
@@ -399,6 +408,7 @@ export const ReactQueryDevtoolsPanel = React.forwardRef(
399408 width : '2rem' ,
400409 height : '2rem' ,
401410 background : getQueryStatusColor ( query , theme ) ,
411+ opacity : getQueryOpacity ( query ) ,
402412 display : 'flex' ,
403413 alignItems : 'center' ,
404414 justifyContent : 'center' ,
0 commit comments