From 1a02b3abe7c0f9b8b1267e59e7d7cadd844a53c4 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Thu, 14 Dec 2023 17:17:43 +0100 Subject: [PATCH] chore(Table): remove unused `click` attribute in rows --- src/runtime/components/data/Table.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/components/data/Table.vue b/src/runtime/components/data/Table.vue index 6bdb78a0..41d911c0 100644 --- a/src/runtime/components/data/Table.vue +++ b/src/runtime/components/data/Table.vue @@ -104,7 +104,7 @@ export default defineComponent({ default: () => defaultComparator }, rows: { - type: Array as PropType<{ [key: string]: any, click?: Function }[]>, + type: Array as PropType<{ [key: string]: any }[]>, default: () => [] }, columns: { @@ -156,7 +156,7 @@ export default defineComponent({ setup (props, { emit, attrs: $attrs }) { const { ui, attrs } = useUI('table', toRef(props, 'ui'), config, toRef(props, 'class')) - const columns = computed(() => props.columns ?? Object.keys(omit(props.rows[0] ?? {}, ['click'])).map((key) => ({ key, label: upperFirst(key), sortable: false }))) + const columns = computed(() => props.columns ?? Object.keys(props.rows[0] ?? {}).map((key) => ({ key, label: upperFirst(key), sortable: false }))) const sort = ref(defu({}, props.sort, { column: null, direction: 'asc' }))