diff --git a/packages/nc-gui/components/dashboard/TreeView.vue b/packages/nc-gui/components/dashboard/TreeView.vue index 183053612b..1ed0b461c9 100644 --- a/packages/nc-gui/components/dashboard/TreeView.vue +++ b/packages/nc-gui/components/dashboard/TreeView.vue @@ -300,18 +300,30 @@ watch( { immediate: true }, ) - const setIcon = (icon: string, table: TableType) => { table.meta = { - // ...table.meta || {}, + ...(table.meta || {}), icon, } + tables.value.splice(tables.value.indexOf(table), 1, { ...table }) + $api.dbTable.update(table.id as string, { - meta: { - icon, - }, + meta: table.meta, }) } + +// const getTableIcon = (table: TableType) => { +// if (table.meta?.icon) { +// return h( +// 'span', +// { +// 'key': table.meta?.icon, +// 'class': 'iconify !cursor-pointer !text-2xl', +// 'data-icon': table.meta?.icon, +// },) +// } +// return icon(table) +// }