MCPcopy Index your code
hub / github.com/OpenPipe/OpenPipe / SortableHeader

Function SortableHeader

app/src/components/sorting.tsx:70–84  ·  view source on GitHub ↗
(props: {
  title: string;
  field: T;
  isNumeric?: boolean;
})

Source from the content-addressed store, hash-verified

68};
69
70export const SortableHeader = <T extends string>(props: {
71 title: string;
72 field: T;
73 isNumeric?: boolean;
74}) => {
75 const sortOrder = useSortOrder<T>();
76
77 return (
78 <Th onClick={() => sortOrder.toggle(props.field)} cursor="pointer">
79 <HStack justify={props.isNumeric ? "end" : undefined}>
80 <Text>{props.title}</Text> <SortArrows<T> field={props.field} />
81 </HStack>
82 </Th>
83 );
84};

Callers

nothing calls this directly

Calls 1

useSortOrderFunction · 0.85

Tested by

no test coverage detected