diff --git a/src/components/VnTable/VnChip.vue b/src/components/VnTable/VnChip.vue index 74207b943..f70ba7423 100644 --- a/src/components/VnTable/VnChip.vue +++ b/src/components/VnTable/VnChip.vue @@ -35,7 +35,9 @@ function stopEventPropagation(event) { dense square > - {{ row[col.name] }} + + {{ col.format ? col.format(row) : row[col.name] }} + diff --git a/src/components/VnTable/VnColumn.vue b/src/components/VnTable/VnColumn.vue index d86dd87da..9f6c6d53d 100644 --- a/src/components/VnTable/VnColumn.vue +++ b/src/components/VnTable/VnColumn.vue @@ -147,7 +147,7 @@ const col = computed(() => { } if ( (newColumn.name.startsWith('is') || newColumn.name.startsWith('has')) && - !newColumn.component + newColumn.component == null ) newColumn.component = 'checkbox'; if ($props.default && !newColumn.component) newColumn.component = $props.default; @@ -158,7 +158,7 @@ const col = computed(() => { const components = computed(() => $props.components ?? defaultComponents);