@bitrise/bitkit 13.342.0 → 13.343.0
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.
package/package.json
CHANGED
|
@@ -126,17 +126,17 @@ const useFilterForm = (props: Omit<FilterFormProps, 'onCancel'>) => {
|
|
|
126
126
|
const items = useMemo(() => {
|
|
127
127
|
let baseItems: string[] = [];
|
|
128
128
|
|
|
129
|
-
if (isAsync) {
|
|
129
|
+
if (isAsync && searchValue) {
|
|
130
130
|
baseItems = debouncedSearchValue ? foundOptions : options || [];
|
|
131
131
|
} else {
|
|
132
132
|
baseItems = searchValue ? filteredOptions : options || [];
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
if (
|
|
136
|
-
return baseItems;
|
|
135
|
+
if (preserveOptionOrder) {
|
|
136
|
+
return Array.from(new Set(baseItems));
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
return Array.from(new Set(
|
|
139
|
+
return Array.from(new Set([...value, ...baseItems]));
|
|
140
140
|
}, [isAsync, debouncedSearchValue, searchValue, foundOptions, filteredOptions, options, preserveOptionOrder, value]);
|
|
141
141
|
|
|
142
142
|
return {
|