mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 12:25:22 +00:00
prevent switching to first page on data update and truncate long repo names in repo list
This commit is contained in:
parent
409344248c
commit
072f77b19a
3 changed files with 3 additions and 1 deletions
|
|
@ -134,7 +134,7 @@ export const columns = (domain: string): ColumnDef<RepositoryColumnInfo>[] => [
|
|||
}
|
||||
}}
|
||||
>
|
||||
{repo.name}
|
||||
{repo.name.length > 40 ? `${repo.name.slice(0, 40)}...` : repo.name}
|
||||
</span>
|
||||
{isRemoteRepo && <ExternalLink className="h-3.5 w-3.5 text-muted-foreground" />}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import { Skeleton } from "@/components/ui/skeleton";
|
|||
|
||||
export const RepositoryTable = () => {
|
||||
const domain = useDomain();
|
||||
|
||||
const { data: repos, isLoading: reposLoading, error: reposError } = useQuery({
|
||||
queryKey: ['repos', domain],
|
||||
queryFn: async () => {
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ export function DataTable<TData, TValue>({
|
|||
getSortedRowModel: getSortedRowModel(),
|
||||
onColumnFiltersChange: setColumnFilters,
|
||||
getFilteredRowModel: getFilteredRowModel(),
|
||||
autoResetPageIndex: false,
|
||||
state: {
|
||||
sorting,
|
||||
columnFilters,
|
||||
|
|
|
|||
Loading…
Reference in a new issue