Skip to content

Commit

Permalink
Add documentation for display.table getData function
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobmischka committed Oct 10, 2022
1 parent dd4b52f commit e496e39
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/ioSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,9 @@ export const ioSchema = {
isAsync: z.optional(z.boolean().default(false)),
}),
state: z.object({
queryTerm: z.string().nullish(),
sortColumn: z.string().nullish(),
sortDirection: z.enum(['asc', 'desc']).nullish(),
queryTerm: z.string().optional(),
sortColumn: z.string().optional(),
sortDirection: z.enum(['asc', 'desc']).optional(),
offset: z.number().int().default(0),
pageSize: z.number().int(),
}),
Expand Down
6 changes: 3 additions & 3 deletions src/utils/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ type RenderedTableRow = {
}

export type TableDataFetcher<Row extends z.infer<typeof tableRow>> = (props: {
queryTerm?: string | null
sortColumn?: string | null
sortDirection?: 'asc' | 'desc' | null
queryTerm?: string
sortColumn?: string
sortDirection?: 'asc' | 'desc'
offset: number
pageSize: number
}) => Promise<{ data: Row[]; totalRecords?: number }>
Expand Down

0 comments on commit e496e39

Please sign in to comment.