Skip to content

Commit b8f2bd9

Browse files
authored
Merge pull request #3983 from dlabrecq/type-ahead
Refactor type-ahead match
2 parents 370cc61 + 4677f36 commit b8f2bd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/routes/components/resourceTypeahead/resourceFetch.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const ResourceFetch: React.FC<ResourceFetchProps> = ({
6363
if (resource && resource.data && resource.data.length > 0 && resourceFetchStatus !== FetchStatus.inProgress) {
6464
options = resource.data.map(item => {
6565
// The resource API typically returns just a value, but account_alias, cluster_alias, and instance_name may be preferred keys.
66-
const value = !isNaN(search as any) ? item.value : item[resourceKey] || item.value;
66+
const value = item[resourceKey]?.includes(search) ? item[resourceKey] : item.value;
6767
return {
6868
key: value,
6969
name: value,

0 commit comments

Comments
 (0)