Skip to content

Commit 60611c4

Browse files
committed
feat: add action buttons for refetch, invalidate, and reset in query overview
1 parent 920e3e3 commit 60611c4

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

client/app/pages/vue-query.vue

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,32 @@ function selectQuery(query: Query) {
106106
text="Query Overview"
107107
:padding="true"
108108
>
109+
<template #actions>
110+
<NButton
111+
v-tooltip="'Refetch'"
112+
title="Refetch"
113+
class="text-primary self-start"
114+
icon="i-carbon-recycle"
115+
:disabled="selectedQuery.state.fetchStatus === 'fetching'"
116+
@click="toRaw(selectedQuery)?.fetch()"
117+
/>
118+
<NButton
119+
v-tooltip="'Invalidate'"
120+
title="Invalidate"
121+
class="text-primary self-start"
122+
icon="i-carbon-trash-can"
123+
:disabled="selectedQuery.state.status === 'pending'"
124+
@click="toRaw(selectedQuery)?.invalidate()"
125+
/>
126+
<NButton
127+
v-tooltip="'Reset'"
128+
title="Reset"
129+
class="text-primary self-start"
130+
icon="i-carbon-restart"
131+
:disabled="selectedQuery.state.status === 'pending'"
132+
@click="toRaw(selectedQuery)?.reset()"
133+
/>
134+
</template>
109135
<div class="grid grid-cols-[auto_1fr] gap-1 px-2 py-2 b-1 b-solid b-gray-200">
110136
<div>
111137
<strong>Query Key:</strong>

0 commit comments

Comments
 (0)