@neovici/cosmoz-autocomplete 10.9.0 → 10.10.1
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.
|
@@ -84,6 +84,6 @@ export const useAutocomplete = ({ value: _value, text, onChange: _onChange, onTe
|
|
|
84
84
|
}, [meta]),
|
|
85
85
|
onDeselect: useCallback((val) => meta.onChange(without(val)(meta.value)), [meta]),
|
|
86
86
|
// whenever there is a query, override defaultIndex to 0, so the first result gets selected
|
|
87
|
-
defaultIndex:
|
|
87
|
+
defaultIndex: query !== undefined && query?.length > 0 ? 0 : defaultIndex,
|
|
88
88
|
};
|
|
89
89
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const search: <I>(source: I[], query: string | undefined, textual: (i: I) => string) => I[];
|
|
2
|
-
export declare const normalize: <I>(source: I[] | false | null) => I[];
|
|
2
|
+
export declare const normalize: <I>(source: I[] | false | null | undefined) => I[];
|
|
3
3
|
export declare const notify: <T>(host: EventTarget, name: string, detail: T) => boolean;
|
|
4
4
|
export declare const useNotify: <V>(host: EventTarget, fn: undefined | ((v: V) => void), name: string) => (val: V) => void;
|
|
5
5
|
export declare const EMPTY: never[];
|
package/dist/index.d.ts
CHANGED