Blob Blame History Raw
From c51faf31a1abc08e26e5ccb4492c1a46f101a22a Mon Sep 17 00:00:00 2001
From: Ivan Devat <idevat@redhat.com>
Date: Tue, 13 Dec 2022 12:58:00 +0100
Subject: [PATCH] fix agents filter in resource/fence device create

---
 .../cluster/fenceDevices/task/create/NameTypeTypeSelect.tsx   | 4 ++--
 .../view/cluster/resources/task/create/NameTypeTypeSelect.tsx | 4 ++--
 src/app/view/share/form/Select.tsx                            | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/app/view/cluster/fenceDevices/task/create/NameTypeTypeSelect.tsx b/src/app/view/cluster/fenceDevices/task/create/NameTypeTypeSelect.tsx
index 80327801..8d623e2b 100644
--- a/src/app/view/cluster/fenceDevices/task/create/NameTypeTypeSelect.tsx
+++ b/src/app/view/cluster/fenceDevices/task/create/NameTypeTypeSelect.tsx
@@ -38,13 +38,13 @@ export const NameTypeTypeSelect = ({
   return (
     <Select
       variant="typeahead"
-      typeAheadAriaLabel="Select a fence device"
+      typeAheadAriaLabel="Select a fence device agent"
+      placeholderText="Select a fence device agent"
       onSelect={onSelect}
       onClear={onClear}
       onFilter={onFilter}
       selections={agentName}
       isGrouped
-      hasInlineFilter
       customBadgeText={agentName.length > 0 ? agentName : undefined}
       optionsValues={filteredFenceAgentList}
       data-test="fence-device-agent"
diff --git a/src/app/view/cluster/resources/task/create/NameTypeTypeSelect.tsx b/src/app/view/cluster/resources/task/create/NameTypeTypeSelect.tsx
index bd7807d8..b531e825 100644
--- a/src/app/view/cluster/resources/task/create/NameTypeTypeSelect.tsx
+++ b/src/app/view/cluster/resources/task/create/NameTypeTypeSelect.tsx
@@ -52,13 +52,13 @@ export const NameTypeTypeSelect = ({
   return (
     <Select
       variant="typeahead"
-      typeAheadAriaLabel="Select a state"
+      typeAheadAriaLabel="Select a resource agent"
+      placeholderText="Select a resource agent"
       onSelect={onSelect}
       onClear={onClear}
       onFilter={onFilter}
       selections={agentName}
       isGrouped
-      hasInlineFilter
       customBadgeText={agentName.length > 0 ? agentName : undefined}
       data-test="resource-agent"
     >
diff --git a/src/app/view/share/form/Select.tsx b/src/app/view/share/form/Select.tsx
index d73f126c..e2b81ce2 100644
--- a/src/app/view/share/form/Select.tsx
+++ b/src/app/view/share/form/Select.tsx
@@ -31,7 +31,7 @@ export const Select = (
   const filter = onFilter
     ? (_event: React.ChangeEvent<HTMLInputElement> | null, value: string) => {
         onFilter(value);
-        return null as unknown as React.ReactElement[];
+        return undefined;
       }
     : null;
 
-- 
2.39.0