fix: show correct icon for group by view
This commit is contained in:
parent
d53891c0ca
commit
5b0232f744
@ -537,12 +537,13 @@ if (allowedViews.includes('group_by')) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function getIcon(icon) {
|
function getIcon(icon, type) {
|
||||||
if (isEmoji(icon)) {
|
if (isEmoji(icon)) {
|
||||||
return h('div', icon)
|
return h('div', icon)
|
||||||
} else {
|
} else if (!icon && type === 'group_by') {
|
||||||
return icon || 'list'
|
return h(DetailsIcon, { class: 'size-4' })
|
||||||
}
|
}
|
||||||
|
return icon || 'list'
|
||||||
}
|
}
|
||||||
|
|
||||||
const viewsDropdownOptions = computed(() => {
|
const viewsDropdownOptions = computed(() => {
|
||||||
@ -557,7 +558,7 @@ const viewsDropdownOptions = computed(() => {
|
|||||||
if (list.value?.data?.views) {
|
if (list.value?.data?.views) {
|
||||||
list.value.data.views.forEach((view) => {
|
list.value.data.views.forEach((view) => {
|
||||||
view.label = __(view.label)
|
view.label = __(view.label)
|
||||||
view.icon = getIcon(view.icon)
|
view.icon = getIcon(view.icon, view.type)
|
||||||
view.filters =
|
view.filters =
|
||||||
typeof view.filters == 'string'
|
typeof view.filters == 'string'
|
||||||
? JSON.parse(view.filters)
|
? JSON.parse(view.filters)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user