@fewangsit/wangsvue-fats 1.0.0-alpha.116 → 1.0.0-alpha.117
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.
|
@@ -25,12 +25,25 @@ export type FilterMatchMode =
|
|
|
25
25
|
| 'DATE_BETWEEN';
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Represents a function type for fetching options based on query parameters.
|
|
29
|
+
*
|
|
30
|
+
* @template T - The type of query parameters, extending `QueryParams`. Defaults to `any`.
|
|
31
|
+
*
|
|
32
|
+
* This function can have one of the following signatures:
|
|
33
|
+
* - A synchronous function that takes query parameters and returns an array of `Option` objects.
|
|
34
|
+
* - An asynchronous function that takes query parameters and returns a `Promise` resolving to an array of `Option` objects.
|
|
35
|
+
* - An asynchronous function that takes query parameters and returns a `Promise` resolving to an `AxiosResponse` containing a `FetchOptionResponse` object.
|
|
36
|
+
*
|
|
37
|
+
* @param args - The query parameters of type `T` used to fetch the options.
|
|
38
|
+
* @returns One of the following:
|
|
39
|
+
* - An array of `Option` objects.
|
|
40
|
+
* - A `Promise` resolving to an array of `Option` objects.
|
|
41
|
+
* - A `Promise` resolving to an `AxiosResponse` containing a `FetchOptionResponse` object.
|
|
29
42
|
*/
|
|
30
|
-
export type FetchOptionFn =
|
|
31
|
-
| ((args:
|
|
32
|
-
| ((args:
|
|
33
|
-
| ((args:
|
|
43
|
+
export type FetchOptionFn<T extends QueryParams = any> =
|
|
44
|
+
| ((args: T) => Option[])
|
|
45
|
+
| ((args: T) => Promise<Option[]>)
|
|
46
|
+
| ((args: T) => Promise<AxiosResponse<FetchOptionResponse<T>>>);
|
|
34
47
|
|
|
35
48
|
// More specific filter field types
|
|
36
49
|
export interface MultiSelectFilterField extends MultiSelectProps {
|