Home / Function/ SortPopover() — supabase Function Reference

SortPopover() — supabase Function Reference

Architecture documentation for the SortPopover() function in SortPopover.tsx from the supabase codebase.

Entity Profile

Relationship Graph

Source Code

apps/studio/components/grid/components/header/sort/SortPopover.tsx lines 12–30

export const SortPopover = ({ tableQueriesEnabled }: SortPopoverProps) => {
  const { urlSorts, onApplySorts } = useTableSort()

  const snap = useTableEditorTableStateSnapshot()
  const tableName = snap.table?.name || ''

  // Convert string[] to Sort[]
  const sorts = useMemo(() => {
    return tableName && urlSorts ? formatSortURLParams(tableName, urlSorts) : []
  }, [tableName, urlSorts])

  return (
    <SortPopoverPrimitive
      sorts={sorts}
      onApplySorts={onApplySorts}
      tableQueriesEnabled={tableQueriesEnabled}
    />
  )
}

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free