@addsign/moje-agenda-shared-lib 2.0.40 → 2.0.41

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.
@@ -0,0 +1,40 @@
1
+ import { IOptionItem } from '../../types';
2
+ import { AxiosInstance } from 'axios';
3
+ import * as React from "react";
4
+ interface AsyncComboboxProps {
5
+ /** The currently selected value */
6
+ value?: string;
7
+ /** Callback to notify parent of selection changes */
8
+ onChange?: (value: string | undefined | any) => void;
9
+ /** Optional additional classes for the trigger button */
10
+ className?: string;
11
+ /** Placeholder text when nothing is selected */
12
+ placeholder?: string;
13
+ /** Placeholder text for the search input inside the dropdown */
14
+ placeholderSearch?: string;
15
+ /** Whether the clear button should be shown */
16
+ clearable?: boolean;
17
+ /**
18
+ * An instance of your Axios API client.
19
+ * For example: `axiosApiClient = axios.create({ baseURL: "https://api.example.com" })`
20
+ */
21
+ axiosApiClient: AxiosInstance;
22
+ /**
23
+ * The URL (or endpoint path) for fetching options.
24
+ * The search query will be appended as a query parameter.
25
+ */
26
+ url: string;
27
+ /**
28
+ * The name of the query parameter that the API expects.
29
+ * For example, if your API expects `?someFilterProp=searchTerm`, pass "someFilterProp"
30
+ */
31
+ filterProp?: string;
32
+ /** Whether to allow adding a custom option if none match */
33
+ allowAddNew?: boolean;
34
+ /** Whether the combobox is disabled */
35
+ disabled?: boolean;
36
+ /** Optionally transform the API response item into an IOptionItem */
37
+ transformOption?: (item: any) => IOptionItem;
38
+ }
39
+ declare const AsyncCombobox: React.ForwardRefExoticComponent<AsyncComboboxProps & React.RefAttributes<HTMLButtonElement>>;
40
+ export default AsyncCombobox;