Browse Source

Merge pull request #7048 from nocodb/nc-fix/lookup-column-modal-column-icon-fix

fix: Fixed issue with Cell icon not taking column prop with column in…
pull/7047/head
Raju Udava 1 year ago committed by GitHub
parent
commit
fef19db1e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      packages/nc-gui/components/smartsheet/header/CellIcon.ts
  2. 4
      packages/nc-gui/components/smartsheet/header/VirtualCellIcon.ts

8
packages/nc-gui/components/smartsheet/header/CellIcon.ts

@ -103,7 +103,9 @@ export default defineComponent({
setup(props) {
const columnMeta = toRef(props, 'columnMeta')
const column = inject(ColumnInj, columnMeta)
const injectedColumn = inject(ColumnInj, columnMeta)
const column = computed(() => columnMeta.value ?? injectedColumn.value)
const { sqlUis } = storeToRefs(useBase())
@ -112,9 +114,9 @@ export default defineComponent({
const abstractType = computed(() => column.value && sqlUi.value.getAbstractType(column.value))
return () => {
if (!column.value) return null
if (!column.value && !columnMeta.value) return null
return h(renderIcon(column.value, abstractType.value), {
return h(renderIcon((columnMeta.value ?? column.value)!, abstractType.value), {
class: 'text-inherit mx-1',
})
}

4
packages/nc-gui/components/smartsheet/header/VirtualCellIcon.ts

@ -78,7 +78,9 @@ export default defineComponent({
setup(props) {
const columnMeta = toRef(props, 'columnMeta')
const column = inject(ColumnInj, columnMeta) as Ref<ColumnType & { colOptions: LookupType | RollupType }>
const injectedColumn = inject(ColumnInj, columnMeta) as Ref<ColumnType & { colOptions: LookupType | RollupType }>
const column = computed(() => columnMeta.value ?? injectedColumn.value)
let relationColumn: ColumnType

Loading…
Cancel
Save