Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/devtools/devtools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { ThemeProvider, defaultTheme as theme } from './theme'
import { getQueryStatusLabel, getQueryStatusColor } from './utils'
import Explorer from './Explorer'
import Logo from './Logo'
import { noop } from '../core/utils'

interface DevtoolsOptions {
/**
Expand Down Expand Up @@ -384,6 +385,11 @@ export const ReactQueryDevtoolsPanel = React.forwardRef(
return undefined
}, [isOpen, sort, sortFn, sortDesc, setUnsortedQueries, queryCache])

const handleRefetch = () => {
const promise = activeQuery.fetch()
promise.catch(noop)
}

return (
<ThemeProvider theme={theme}>
<Panel
Expand Down Expand Up @@ -710,7 +716,7 @@ export const ReactQueryDevtoolsPanel = React.forwardRef(
>
<Button
type="button"
onClick={() => activeQuery.fetch()}
onClick={handleRefetch}
disabled={activeQuery.state.isFetching}
style={{
background: theme.active,
Expand Down