mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
ui: fix column filter for templates, isos (#10288)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
parent
a335feab6a
commit
97be6f2e5d
@ -32,7 +32,7 @@
|
||||
<a-menu>
|
||||
<a-menu-item v-for="(column, idx) in columnKeys" :key="idx" @click="updateSelectedColumns(column)">
|
||||
<a-checkbox :id="idx.toString()" :checked="selectedColumns.includes(getColumnKey(column))"/>
|
||||
{{ $t('label.' + String(getColumTitle(column)).toLowerCase()) }}
|
||||
{{ $t('label.' + String(getColumnTitle(column)).toLowerCase()) }}
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</div>
|
||||
@ -911,16 +911,16 @@ export default {
|
||||
return host.state
|
||||
},
|
||||
getColumnKey (name) {
|
||||
if (typeof name === 'object') {
|
||||
name = Object.keys(name).includes('field') ? name.field : name.customTitle
|
||||
}
|
||||
if (typeof name !== 'object' || name === null) {
|
||||
return name
|
||||
}
|
||||
return name.field ?? name.customTitle ?? Object.keys(name)[0]
|
||||
},
|
||||
getColumTitle (name) {
|
||||
if (typeof name === 'object') {
|
||||
name = Object.keys(name).includes('customTitle') ? name.customTitle : name.field
|
||||
}
|
||||
getColumnTitle (name) {
|
||||
if (typeof name !== 'object' || name === null) {
|
||||
return name
|
||||
}
|
||||
return name.customTitle ?? name.field ?? Object.keys(name)[0]
|
||||
},
|
||||
updateSelectedColumns (name) {
|
||||
this.$emit('update-selected-columns', name)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user