mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
fix: entity types query keepPreviousData (#20476)
This commit is contained in:
1 parent
8e5b289fcf
commit
4bf421c5c3
3 files changed
+14
-22
No files matched your search
@@ -36,16 +36,13 @@ const CreateIndexSidePanel = ({ visible, onClose }: CreateIndexSidePanelProps) =
|
||||
projectRef: project?.ref,
|
||||
connectionString: project?.connectionString,
|
||||
})
|
||||
const { data: entities } = useEntityTypesQuery(
|
||||
{
|
||||
schema: selectedSchema,
|
||||
sort: 'alphabetical',
|
||||
search: undefined,
|
||||
projectRef: project?.ref,
|
||||
connectionString: project?.connectionString,
|
||||
},
|
||||
{ keepPreviousData: true }
|
||||
)
|
||||
const { data: entities } = useEntityTypesQuery({
|
||||
schema: selectedSchema,
|
||||
sort: 'alphabetical',
|
||||
search: undefined,
|
||||
projectRef: project?.ref,
|
||||
connectionString: project?.connectionString,
|
||||
})
|
||||
const {
|
||||
data: tableColumns,
|
||||
isLoading: isLoadingTableColumns,
|
||||
|
||||
@@ -21,17 +21,12 @@ const EmptyState = ({}: EmptyStateProps) => {
|
||||
)
|
||||
|
||||
const { project } = useProjectContext()
|
||||
const { data } = useEntityTypesQuery(
|
||||
{
|
||||
projectRef: project?.ref,
|
||||
connectionString: project?.connectionString,
|
||||
schema: snap.selectedSchemaName,
|
||||
sort,
|
||||
},
|
||||
{
|
||||
keepPreviousData: true,
|
||||
}
|
||||
)
|
||||
const { data } = useEntityTypesQuery({
|
||||
projectRef: project?.ref,
|
||||
connectionString: project?.connectionString,
|
||||
schema: snap.selectedSchemaName,
|
||||
sort,
|
||||
})
|
||||
|
||||
const totalCount = data?.pages?.[0].data.count ?? 0
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ const TableEditorMenu = () => {
|
||||
sort,
|
||||
},
|
||||
{
|
||||
keepPreviousData: true,
|
||||
keepPreviousData: Boolean(searchText),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user