The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: Disable sorting by json/jsonb columns (#28395)
Ivan Vasilove094a3617754
diff --git a/apps/studio/components/grid/components/header/sort/SortPopover.tsx b/apps/studio/components/grid/components/header/sort/SortPopover.tsxindex 39e1811aa51..6d86f88d715 100644--- a/apps/studio/components/grid/components/header/sort/SortPopover.tsx+++ b/apps/studio/components/grid/components/header/sort/SortPopover.tsx@@ -69,6 +69,11 @@ const SortOverlay = ({ table, sorts: sortsFromUrl, onApplySorts }: SortOverlayPrconst [sorts, setSorts] = useState<Sort[]>(initialSorts)const columns = table.columns!.filter((x) => {+ // exclude json/jsonb columns from sorting. Sorting by json fields in PG is only possible if you provide key from+ // the JSON object.+ if (x.dataType === 'json' || x.dataType === 'jsonb') {+ return false+ }const found = sorts.find((y) => y.column == x.name)return !found})