Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Hide row number while excecuting sql

Joshen Lim3ad68d21eba0
diff --git a/studio/components/interfaces/SQLEditor/UtilityPanel/ResultsDropdown.tsx b/studio/components/interfaces/SQLEditor/UtilityPanel/ResultsDropdown.tsx
index ae49be8872d..f5f249468fa 100644
--- a/studio/components/interfaces/SQLEditor/UtilityPanel/ResultsDropdown.tsx
+++ b/studio/components/interfaces/SQLEditor/UtilityPanel/ResultsDropdown.tsx
@@ -14,9 +14,10 @@ import MarkdownTable from 'markdown-table'
export type ResultsDropdownProps = {
id: string
+ isExecuting?: boolean
}
-const ResultsDropdown = ({ id }: ResultsDropdownProps) => {
+const ResultsDropdown = ({ id, isExecuting }: ResultsDropdownProps) => {
const { project } = useProjectContext()
const snap = useSqlEditorStateSnapshot()
const telemetryProps = useTelemetryProps()
@@ -111,7 +112,11 @@ const ResultsDropdown = ({ id }: ResultsDropdownProps) => {
>
<Button asChild type="text" iconRight={<IconChevronDown />}>
<span>
- Results {result && result.rows.length > 0 && `(${result.rows.length.toLocaleString()})`}
+ Results{' '}
+ {!isExecuting &&
+ result &&
+ result.rows.length > 0 &&
+ `(${result.rows.length.toLocaleString()})`}
</span>
</Button>
<CSVLink
diff --git a/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityPanel.tsx b/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityPanel.tsx
index a01d84445f2..59537d7b637 100644
--- a/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityPanel.tsx
+++ b/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityPanel.tsx
@@ -13,7 +13,7 @@ const UtilityPanel = ({ id, isExecuting, isDisabled, executeQuery }: UtilityPane
return (
<>
<div className="flex justify-between overflow-visible px-6 py-2">
- <ResultsDropdown id={id} />
+ <ResultsDropdown id={id} isExecuting={isExecuting} />
<div className="inline-flex items-center justify-end">
<UtilityActions