From 922c9e9cccf5e3652ba1c6934d670d1c9e3c3920 Mon Sep 17 00:00:00 2001 From: Linghao Su Date: Wed, 15 Jan 2025 22:55:01 +0800 Subject: [PATCH] feat(ui): support filter repo when input (#21451) Signed-off-by: linghaoSu --- .../application-create-panel.tsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/ui/src/app/applications/components/application-create-panel/application-create-panel.tsx b/ui/src/app/applications/components/application-create-panel/application-create-panel.tsx index 2a56246ad0c08..b6bef94f0a1fa 100644 --- a/ui/src/app/applications/components/application-create-panel/application-create-panel.tsx +++ b/ui/src/app/applications/components/application-create-panel/application-create-panel.tsx @@ -304,7 +304,10 @@ export const ApplicationCreatePanel = (props: { qeId='application-create-field-repository-url' field='spec.source.repoURL' component={AutocompleteField} - componentProps={{items: repos}} + componentProps={{ + items: repos, + filterSuggestions: true + }} />
@@ -396,7 +399,8 @@ export const ApplicationCreatePanel = (props: { field='spec.source.targetRevision' component={AutocompleteField} componentProps={{ - items: (selectedChart && selectedChart.versions) || [] + items: (selectedChart && selectedChart.versions) || [], + filterSuggestions: true }} /> @@ -419,7 +423,10 @@ export const ApplicationCreatePanel = (props: { label='Cluster URL' qeId='application-create-field-cluster-url' field='spec.destination.server' - componentProps={{items: clusters.map(cluster => cluster.server)}} + componentProps={{ + items: clusters.map(cluster => cluster.server), + filterSuggestions: true + }} component={AutocompleteField} />
@@ -430,7 +437,10 @@ export const ApplicationCreatePanel = (props: { label='Cluster Name' qeId='application-create-field-cluster-name' field='spec.destination.name' - componentProps={{items: clusters.map(cluster => cluster.name)}} + componentProps={{ + items: clusters.map(cluster => cluster.name), + filterSuggestions: true + }} component={AutocompleteField} />