Comparing version 3.0.0-alpha.9 to 3.0.0-alpha.10
@@ -35,6 +35,8 @@ var __assign = this && this.__assign || function () { | ||
onSort: function onSort(dataIndex, order) { | ||
var _a; | ||
result.tableProps.onChange({ | ||
current: result.pagination.current, | ||
pageSize: result.pagination.pageSize | ||
}, result.filters, { | ||
}, (_a = result.params[0]) === null || _a === void 0 ? void 0 : _a.filters, { | ||
field: dataIndex, | ||
@@ -45,6 +47,8 @@ order: order | ||
onFilter: function onFilter(filterParams) { | ||
var _a; | ||
result.tableProps.onChange({ | ||
current: result.pagination.current, | ||
pageSize: result.pagination.pageSize | ||
}, filterParams, result.sorter); | ||
}, filterParams, (_a = result.params[0]) === null || _a === void 0 ? void 0 : _a.sorter); | ||
} | ||
@@ -51,0 +55,0 @@ }; |
import type { Data, Params, Service } from '../useAntdTable/types'; | ||
import type { FusionTableOptions } from './types'; | ||
declare const useFusionTable: <TData extends Data, TParams extends Params>(service: Service<TData, TParams>, options?: FusionTableOptions<TData, TParams>) => any; | ||
import type { FusionTableOptions, FusionTableResult } from './types'; | ||
declare const useFusionTable: <TData extends Data, TParams extends any[] = Params>(service: Service<TData, TParams>, options?: FusionTableOptions<TData, TParams>) => FusionTableResult<TData, TParams>; | ||
export default useFusionTable; |
@@ -1,2 +0,2 @@ | ||
import type { AntdTableOptions, AntdTableResult, Data, Params } from '../useAntdTable/types'; | ||
import type { AntdTableOptions, AntdTableResult, Data } from '../useAntdTable/types'; | ||
export interface Field { | ||
@@ -10,3 +10,3 @@ getFieldInstance?: (name: string) => {}; | ||
} | ||
export interface FusionTableResult<TData extends Data, TParams extends Params> extends Omit<AntdTableResult<TData, TParams>, 'tableProps'> { | ||
export interface FusionTableResult<TData extends Data, TParams extends any[]> extends Omit<AntdTableResult<TData, TParams>, 'tableProps'> { | ||
paginationProps: { | ||
@@ -32,4 +32,4 @@ onChange: (current: number) => void; | ||
} | ||
export interface FusionTableOptions<TData extends Data, TParams extends Params> extends Omit<AntdTableOptions<TData, TParams>, 'form'> { | ||
export interface FusionTableOptions<TData extends Data, TParams extends any[]> extends Omit<AntdTableOptions<TData, TParams>, 'form'> { | ||
field?: Field; | ||
} |
@@ -43,6 +43,8 @@ "use strict"; | ||
onSort: function onSort(dataIndex, order) { | ||
var _a; | ||
result.tableProps.onChange({ | ||
current: result.pagination.current, | ||
pageSize: result.pagination.pageSize | ||
}, result.filters, { | ||
}, (_a = result.params[0]) === null || _a === void 0 ? void 0 : _a.filters, { | ||
field: dataIndex, | ||
@@ -53,6 +55,8 @@ order: order | ||
onFilter: function onFilter(filterParams) { | ||
var _a; | ||
result.tableProps.onChange({ | ||
current: result.pagination.current, | ||
pageSize: result.pagination.pageSize | ||
}, filterParams, result.sorter); | ||
}, filterParams, (_a = result.params[0]) === null || _a === void 0 ? void 0 : _a.sorter); | ||
} | ||
@@ -59,0 +63,0 @@ }; |
import type { Data, Params, Service } from '../useAntdTable/types'; | ||
import type { FusionTableOptions } from './types'; | ||
declare const useFusionTable: <TData extends Data, TParams extends Params>(service: Service<TData, TParams>, options?: FusionTableOptions<TData, TParams>) => any; | ||
import type { FusionTableOptions, FusionTableResult } from './types'; | ||
declare const useFusionTable: <TData extends Data, TParams extends any[] = Params>(service: Service<TData, TParams>, options?: FusionTableOptions<TData, TParams>) => FusionTableResult<TData, TParams>; | ||
export default useFusionTable; |
@@ -1,2 +0,2 @@ | ||
import type { AntdTableOptions, AntdTableResult, Data, Params } from '../useAntdTable/types'; | ||
import type { AntdTableOptions, AntdTableResult, Data } from '../useAntdTable/types'; | ||
export interface Field { | ||
@@ -10,3 +10,3 @@ getFieldInstance?: (name: string) => {}; | ||
} | ||
export interface FusionTableResult<TData extends Data, TParams extends Params> extends Omit<AntdTableResult<TData, TParams>, 'tableProps'> { | ||
export interface FusionTableResult<TData extends Data, TParams extends any[]> extends Omit<AntdTableResult<TData, TParams>, 'tableProps'> { | ||
paginationProps: { | ||
@@ -32,4 +32,4 @@ onChange: (current: number) => void; | ||
} | ||
export interface FusionTableOptions<TData extends Data, TParams extends Params> extends Omit<AntdTableOptions<TData, TParams>, 'form'> { | ||
export interface FusionTableOptions<TData extends Data, TParams extends any[]> extends Omit<AntdTableOptions<TData, TParams>, 'form'> { | ||
field?: Field; | ||
} |
{ | ||
"name": "ahooks", | ||
"version": "3.0.0-alpha.9", | ||
"version": "3.0.0-alpha.10", | ||
"description": "react hooks library", | ||
@@ -62,3 +62,3 @@ "keywords": [ | ||
"license": "MIT", | ||
"gitHead": "d107a770846594b8e8a0ad467742000379f98f6b" | ||
"gitHead": "1b67bdb4bce0805df77420a69ed05d240d17e061" | ||
} |
@@ -30,6 +30,6 @@ <p align="center"> | ||
- Easy to learn and use | ||
- Support SSR | ||
- Supports SSR | ||
- Special treatment for functions, avoid closure problems | ||
- Contains a wealth of advanced Hooks that are refined from the app | ||
- Contains a wealth of basic Hooks | ||
- Contains a large number of advanced Hooks that are refined from business scenarios | ||
- Contains a comprehensive collection of basic Hooks | ||
- Written in TypeScript with predictable static types | ||
@@ -47,7 +47,7 @@ | ||
```js | ||
```ts | ||
import { useRequest } from 'ahooks'; | ||
``` | ||
## đģ Online Experience | ||
## đģ Online Demo | ||
@@ -54,0 +54,0 @@ [![Edit demo for ahooks](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/demo-for-ahooks-forked-fg79k?file=/src/App.js) |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
607858
15242