This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.20 by this push:
new f379d789635 ui: fix section search filter (#12146)
f379d789635 is described below
commit f379d789635a140fd6ea287d1d4384743328fc56
Author: Abhishek Kumar <[email protected]>
AuthorDate: Fri Nov 28 09:29:10 2025 +0100
ui: fix section search filter (#12146)
Signed-off-by: Abhishek Kumar <[email protected]>
---
ui/src/views/AutogenView.vue | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue
index b1f26a17f8f..a01e300c1c9 100644
--- a/ui/src/views/AutogenView.vue
+++ b/ui/src/views/AutogenView.vue
@@ -1821,8 +1821,13 @@ export default {
},
onSearch (opts) {
const query = Object.assign({}, this.$route.query)
- const searchFilters = this.$route?.meta?.searchFilters || []
- searchFilters.forEach(key => delete query[key])
+ let searchFilters = this.$route?.meta?.searchFilters || []
+ if (typeof searchFilters === 'function') {
+ searchFilters = searchFilters()
+ }
+ if (Array.isArray(searchFilters)) {
+ searchFilters.forEach(key => delete query[key])
+ }
delete query.name
delete query.templatetype
delete query.keyword