Browse Source

enhancement: add icons to column filter

pull/2163/head
Wing-Kam Wong 3 years ago
parent
commit
080c61d514
  1. 13
      packages/nc-gui/components/project/spreadsheet/components/ColumnFilter.vue

13
packages/nc-gui/components/project/spreadsheet/components/ColumnFilter.vue

@ -109,9 +109,10 @@
@change="saveOrUpdate(filter, i)" @change="saveOrUpdate(filter, i)"
> >
<template #item="{ item }"> <template #item="{ item }">
<span <span :class="`caption font-weight-regular nc-filter-fld-${item.title}`">
:class="`caption font-weight-regular nc-filter-fld-${item.title}`" <v-icon color="grey darken-4" small class="mr-1">
> {{ item.icon }}
</v-icon>
{{ item.title }} {{ item.title }}
</span> </span>
</template> </template>
@ -182,6 +183,7 @@
</template> </template>
<script> <script>
import { getUIDTIcon } from '../helpers/uiTypes'
import { UITypes } from '~/components/project/spreadsheet/helpers/uiTypes' import { UITypes } from '~/components/project/spreadsheet/helpers/uiTypes'
export default { export default {
@ -276,7 +278,10 @@ export default {
columns() { columns() {
return ( return (
this.meta && this.meta &&
this.meta.columns.filter(c => c && (!c.colOptions || !c.system)) this.meta.columns.filter(c => c && (!c.colOptions || !c.system)).map(c => ({
...c,
icon: getUIDTIcon(c.uidt)
}))
) )
}, },
types() { types() {

Loading…
Cancel
Save