Skip to content

Commit

Permalink
fix(styles): fix useTable type
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed May 8, 2024
1 parent 1978397 commit 071241f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
6 changes: 0 additions & 6 deletions packages/hooks/src/use-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,6 @@ export type TableConfig<A extends ApiFn, T, C> = {
* @default true
*/
immediate?: boolean;
/**
* whether to display the total items count
*
* @default false
*/
showTotal?: boolean;
};

export default function useHookTable<A extends ApiFn, T, C>(config: TableConfig<A, T, C>) {
Expand Down
11 changes: 9 additions & 2 deletions src/typings/naive-ui.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ declare namespace NaiveUI {

type NaiveTableConfig<A extends TableApiFn> = Pick<
import('@sa/hooks').TableConfig<A, GetTableData<A>, TableColumn<TableDataWithIndex<GetTableData<A>>>>,
'apiFn' | 'apiParams' | 'columns' | 'immediate' | 'showTotal'
>;
'apiFn' | 'apiParams' | 'columns' | 'immediate'
> & {
/**
* whether to display the total items count
*
* @default false
*/
showTotal?: boolean;
};
}

0 comments on commit 071241f

Please sign in to comment.