@lctafrica/ui 1.2.6 → 1.2.7

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.
@@ -1,15 +1,20 @@
1
- export type SearchableSelectOption = {
1
+ export type SearchableSelectOption<T> = {
2
+ key?: string | number;
3
+ value: T;
2
4
  label: string;
3
- value: string;
4
5
  };
5
- export type SearchableSelectProps = {
6
- options?: SearchableSelectOption[];
7
- value?: string | null;
6
+ export type SearchableSelectProps<T> = {
7
+ value: T | null | undefined;
8
+ options: SearchableSelectOption<T>[];
8
9
  placeholder?: string;
9
- onChange?(value: string | null): void;
10
+ onChange(value: T | null): void;
11
+ containerClassName?: string;
12
+ inputClassName?: string;
13
+ id?: string;
14
+ query: string;
15
+ onQueryChange(value: string): void;
16
+ isFetchingOptions?: boolean;
17
+ attachTo?: "top" | "bottom";
10
18
  disabled?: boolean;
11
- name?: string;
12
- query?: string;
13
- onQueryChange?(value: string): void;
14
19
  };
15
- export declare function SearchableSelect({ options, placeholder, value, disabled, name, onChange, onQueryChange, query, }: SearchableSelectProps): import("react/jsx-runtime").JSX.Element;
20
+ export declare function SearchableSelect<T>({ onChange, options, value, containerClassName, placeholder, onQueryChange, query, isFetchingOptions, inputClassName, id, attachTo, disabled, }: SearchableSelectProps<T>): import("react/jsx-runtime").JSX.Element;