Skip to content

Commit

Permalink
feat(table): add title property to change col title Thanks @yooneskh
Browse files Browse the repository at this point in the history
closes #206
  • Loading branch information
jd-solanki committed Aug 25, 2023
1 parent dc9f4f3 commit 8fd8632
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/anu-vue/src/components/table/ATable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const _cols = computed<ATablePropColumn<Row>[]>(() => {
:name="`header-${col.name}`"
v-bind="{ col }"
>
<span>{{ col.name }}</span>
<span>{{ col.title ?? col.name }}</span>
</slot>
</th>
</tr>
Expand Down
1 change: 1 addition & 0 deletions packages/anu-vue/src/components/table/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export type RowKey<Row extends Record<string, unknown>> = keyof Row & string
// 👉 Props
export interface ATablePropColumn<Row extends Record<string, unknown>> {
name: LiteralUnion<RowKey<Row>, string>
title?: string
classes?: any
formatter?: (val: unknown) => unknown

Expand Down

0 comments on commit 8fd8632

Please sign in to comment.