-
Notifications
You must be signed in to change notification settings - Fork 13
cleanup: Remove "inline" pagination #2458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,8 +53,6 @@ export const useQueryTable = <A extends ApiListMethods, M extends keyof A>( | |
type QueryTableProps<Item> = { | ||
/** Prints table data in the console when enabled */ | ||
debug?: boolean | ||
/** Function that produces a list of actions from a row item */ | ||
pagination?: 'inline' | 'page' | ||
pageSize?: number | ||
rowHeight?: 'small' | 'large' | ||
emptyState: React.ReactElement | ||
|
@@ -71,7 +69,6 @@ const makeQueryTable = <Item extends Record<string, unknown>>( | |
): ComponentType<QueryTableProps<Item>> => | ||
function QueryTable({ | ||
debug, | ||
pagination = 'page', | ||
pageSize = PAGE_SIZE, | ||
rowHeight = 'small', | ||
emptyState, | ||
|
@@ -115,7 +112,6 @@ const makeQueryTable = <Item extends Record<string, unknown>>( | |
<> | ||
<Table table={table} rowHeight={rowHeight} /> | ||
<Pagination | ||
inline={pagination === 'inline'} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was always false because |
||
pageSize={pageSize} | ||
hasNext={tableData.length === pageSize} | ||
hasPrev={hasPrev} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,6 @@ const PageInput = ({ number, className }: PageInputProps) => { | |
} | ||
|
||
export interface PaginationProps { | ||
type?: 'inline' | 'page' | ||
pageSize: number | ||
hasNext: boolean | ||
hasPrev: boolean | ||
|
@@ -37,7 +36,6 @@ export interface PaginationProps { | |
className?: string | ||
} | ||
export const Pagination = ({ | ||
type = 'inline', | ||
pageSize, | ||
hasNext, | ||
hasPrev, | ||
|
@@ -50,7 +48,6 @@ export const Pagination = ({ | |
<> | ||
<div | ||
className={cn( | ||
type === 'page' && 'py-5', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the weird bit. In all the calling code above this, we were always |
||
'flex items-center justify-between text-mono-sm text-default bg-default', | ||
className | ||
)} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inline
was never true here. The only callsite is inQueryTable
, which defaults topage
and was never overridden.