@ahoo-wang/fetcher-viewer 3.1.5 → 3.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,16 +2,16 @@ import { SelectProps, RefSelectProps } from 'antd';
|
|
|
2
2
|
import { UseDebouncedCallbackOptions } from '@ahoo-wang/fetcher-react';
|
|
3
3
|
import { StyleCapable } from '../types';
|
|
4
4
|
import { RefAttributes } from 'react';
|
|
5
|
-
import { DefaultOptionType } from 'antd/lib/select';
|
|
6
|
-
export interface RemoteSelectProps extends Omit<SelectProps, 'loading' | 'onSearch'>, RefAttributes<RefSelectProps>, StyleCapable {
|
|
5
|
+
import { BaseOptionType, DefaultOptionType } from 'antd/lib/select';
|
|
6
|
+
export interface RemoteSelectProps<ValueType = any, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType> extends Omit<SelectProps<ValueType, OptionType>, 'loading' | 'onSearch'>, RefAttributes<RefSelectProps>, StyleCapable {
|
|
7
7
|
debounce?: UseDebouncedCallbackOptions;
|
|
8
|
-
search: (search: string) => Promise<
|
|
8
|
+
search: (search: string) => Promise<OptionType[]>;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* A Select component that loads options from a remote API.
|
|
12
12
|
* Supports automatic fetching, loading states, and error handling.
|
|
13
13
|
*/
|
|
14
|
-
export declare function RemoteSelect(props: RemoteSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function RemoteSelect<ValueType = any, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType>(props: RemoteSelectProps<ValueType, OptionType>): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export declare namespace RemoteSelect {
|
|
16
16
|
var displayName: string;
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteSelect.d.ts","sourceRoot":"","sources":["../../src/components/RemoteSelect.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAU,WAAW,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAC3D,OAAO,EACL,2BAA2B,EAE5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"RemoteSelect.d.ts","sourceRoot":"","sources":["../../src/components/RemoteSelect.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAU,WAAW,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAC3D,OAAO,EACL,2BAA2B,EAE5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpE,MAAM,WAAW,iBAAiB,CAAC,SAAS,GAAG,GAAG,EAAE,UAAU,SAAS,cAAc,GAAG,iBAAiB,GAAG,iBAAiB,CAC3H,SAAQ,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,EACtE,aAAa,CAAC,cAAc,CAAC,EAC7B,YAAY;IACd,QAAQ,CAAC,EAAE,2BAA2B,CAAC;IACvC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;CACnD;AAQD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,SAAS,GAAG,GAAG,EAAE,UAAU,SAAS,cAAc,GAAG,iBAAiB,GAAG,iBAAiB,EACrH,KAAK,EAAE,iBAAiB,CAAC,SAAS,EAAE,UAAU,CAAC,2CAsBhD;yBAvBe,YAAY"}
|