Skip to content

Commit 3cc3f1b

Browse files
authored
fix: increase snippet limit within folders (supabase#31259)
1 parent 05e0667 commit 3cc3f1b

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

apps/studio/components/interfaces/SQLEditor/MoveQueryModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ export const MoveQueryModal = ({ visible, snippets = [], onClose }: MoveQueryMod
192192
<form id="move-snippet" onSubmit={form.handleSubmit(onConfirmMove)}>
193193
<DialogHeader>
194194
<DialogTitle>
195-
Move {snippets.length === 1 ? `"${snippets[0].name}"` : `${snippets.length}`} to a
196-
folder
195+
Move {snippets.length === 1 ? `"${snippets[0].name}"` : `${snippets.length}`}{' '}
196+
snippet{snippets.length > 1 ? 's' : ''} to a folder
197197
</DialogTitle>
198198
<DialogDescription>
199199
Select which folder to move your quer{snippets.length > 1 ? 'ies' : 'y'} to

apps/studio/data/content/sql-folder-contents-query.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useInfiniteQuery, UseInfiniteQueryOptions } from '@tanstack/react-query
33
import { get, handleError } from 'data/fetchers'
44
import { ResponseError } from 'types'
55
import { contentKeys } from './keys'
6+
import { SNIPPET_PAGE_LIMIT } from './sql-folders-query'
67

78
export type SQLSnippetFolderContentsVariables = {
89
projectRef?: string
@@ -24,7 +25,13 @@ export async function getSQLSnippetFolderContents(
2425
const { data, error } = await get('/platform/projects/{ref}/content/folders/{id}', {
2526
params: {
2627
path: { ref: projectRef, id: folderId },
27-
query: { cursor, limit: '3', sort_by: sort, sort_order: sortOrder, name },
28+
query: {
29+
cursor,
30+
limit: SNIPPET_PAGE_LIMIT.toString(),
31+
sort_by: sort,
32+
sort_order: sortOrder,
33+
name,
34+
},
2835
},
2936
signal,
3037
})

0 commit comments

Comments
 (0)