diff --git a/src/components/table/VDataTable.vue b/src/components/table/VDataTable.vue index 5f46d8c..19f231c 100644 --- a/src/components/table/VDataTable.vue +++ b/src/components/table/VDataTable.vue @@ -4,8 +4,8 @@ import type { DataTableProps, DataTableSlots } from 'primevue/datatable'; import { useId, ref, watch, computed } from 'vue'; export interface IVDataTable extends Partial>{ - id: string - title: string + id?: string + title?: string } const props = withDefaults(defineProps(), { @@ -80,7 +80,12 @@ const props = withDefaults(defineProps(), { multiSortMeta: undefined, }) -const slots = defineSlots(); +type VDataTableSlots = DataTableSlots & { + default?: (props: Record) => unknown +}; + +const slots = defineSlots(); + const dataTableSlotKeys = [ 'header', @@ -91,9 +96,7 @@ const dataTableSlotKeys = [ 'loading', 'expansion', 'loadingicon', - 'reorderindicatorupicon', // deprecated 'rowreorderindicatorupicon', - 'reorderindicatordownicon', // deprecated 'rowreorderindicatordownicon', 'rowgrouptogglericon', 'paginatorcontainer', @@ -402,6 +405,7 @@ watch(localEditingRows, (newVal) => { @stateRestore="emit('state-restore', $event)" @stateSave="emit('state-save', $event)" @selectAllChange="emit('select-all-change', $event)" + class="p-datatable" > + + +