@@ -16,7 +16,11 @@ import {
16
16
Select ,
17
17
} from './styledComponents'
18
18
import { ThemeProvider } from './theme'
19
- import { getQueryStatusLabel , getQueryStatusColor } from './utils'
19
+ import {
20
+ getQueryStatusLabel ,
21
+ getQueryStatusColor ,
22
+ getQueryOpacity ,
23
+ } from './utils'
20
24
import Explorer from './Explorer'
21
25
import Logo from './Logo'
22
26
@@ -171,8 +175,7 @@ const sortFns = {
171
175
172
176
export const ReactQueryDevtoolsPanel = React . forwardRef (
173
177
function ReactQueryDevtoolsPanel ( props , ref ) {
174
-
175
- const queryCache = useQueryCache ? useQueryCache ( ) : cache ;
178
+ const queryCache = useQueryCache ? useQueryCache ( ) : cache
176
179
177
180
const [ sort , setSort ] = useLocalStorage (
178
181
'reactQueryDevtoolsSortFn' ,
@@ -217,7 +220,13 @@ export const ReactQueryDevtoolsPanel = React.forwardRef(
217
220
218
221
return [
219
222
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 ,
221
230
]
222
231
} , [ activeQueryHash , queries ] )
223
232
@@ -236,7 +245,7 @@ export const ReactQueryDevtoolsPanel = React.forwardRef(
236
245
return queryCache . subscribe ( queryCache => {
237
246
setUnsortedQueries ( Object . values ( queryCache . queries ) )
238
247
} )
239
- } , [ sort , sortFn , sortDesc ] )
248
+ } , [ sort , sortFn , sortDesc , queryCache ] )
240
249
241
250
React . useEffect ( ( ) => {
242
251
if ( activeQueryHash && ! activeQuery ) {
@@ -399,6 +408,7 @@ export const ReactQueryDevtoolsPanel = React.forwardRef(
399
408
width : '2rem' ,
400
409
height : '2rem' ,
401
410
background : getQueryStatusColor ( query , theme ) ,
411
+ opacity : getQueryOpacity ( query ) ,
402
412
display : 'flex' ,
403
413
alignItems : 'center' ,
404
414
justifyContent : 'center' ,
0 commit comments