From 8a2c0f3f732c39f222373f98e22f81d103f5b11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernardo=20De=20Marco=20Gon=C3=A7alves?= Date: Tue, 19 Nov 2024 08:36:22 -0300 Subject: [PATCH] UI: Improve filtering of VM and template settings (#9683) * improve VMs and templates settings filtering * fix incorrect prop passed in to the `a-auto-complete` component --- ui/src/components/view/DetailSettings.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ui/src/components/view/DetailSettings.vue b/ui/src/components/view/DetailSettings.vue index 1581c2daef8..9f808b907c7 100644 --- a/ui/src/components/view/DetailSettings.vue +++ b/ui/src/components/view/DetailSettings.vue @@ -39,7 +39,7 @@ { @@ -188,7 +188,12 @@ export default { this.updateResource(this.resource) }, methods: { - filterOption (input, option) { + filterOption (input, option, filterType) { + if ((filterType === 'key' && !this.newKey) || + (filterType === 'value' && !this.newValue)) { + return true + } + return ( option.value.toUpperCase().indexOf(input.toUpperCase()) >= 0 )