-
Notifications
You must be signed in to change notification settings - Fork 9
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
separate interface for pagination #28
Comments
something like export interface Pagination {
/**
* If a boolean, enables/disables paging with the default configuration. If a number, paging will be
* enabled with the given number of entries per page.
*/
paging?: number | boolean;
/** The initial page of the table. */
initialPage?: number;
/** Controlled prop for setting the page of the table. */
page?: number;
} which could then be extended like this export interface TableProps<T> extends Pagination {
// ...
} |
It saves some typing, but the main benefit of extracting is if we can actually write generic code that just needs |
i'm experimenting with creating a generic |
all the views currently implemented (List and Table) have pagination props:
datacore/src/ui/table.tsx
Lines 31 to 40 in b6d7ed7
i was thinking, maybe we could move these to a separate interface, and have
TableProps
andListState
extend said interface, to avoid repitition.what do you think?
The text was updated successfully, but these errors were encountered: