Include subjectRefKey in comments queryKey (#7685)

pull/7687/head^2
Ryan Wang 2025-08-15 22:55:40 +08:00 committed by GitHub
parent da10ed4cbd
commit 7d51f38d96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 1 deletions

View File

@ -13,7 +13,16 @@ export default function useCommentsFetch(
subjectRefKey?: Ref<string | undefined> subjectRefKey?: Ref<string | undefined>
) { ) {
return useQuery<ListedCommentList>({ return useQuery<ListedCommentList>({
queryKey: [queryKey, page, size, approved, sort, user, keyword], queryKey: [
queryKey,
page,
size,
approved,
sort,
user,
keyword,
subjectRefKey,
],
queryFn: async () => { queryFn: async () => {
const fieldSelectorMap: Record<string, string | boolean | undefined> = { const fieldSelectorMap: Record<string, string | boolean | undefined> = {
"spec.approved": approved.value, "spec.approved": approved.value,