From 8b9d1d8eb39a4089b9f6ef528668bbb28fb2a4c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Mon, 8 May 2023 17:08:06 +0300 Subject: [PATCH] Refactor #3924 - For DataTable --- api-generator/components/datatable.js | 6 + components/lib/config/PrimeVue.d.ts | 2 + components/lib/datatable/BodyCell.vue | 29 +- components/lib/datatable/ColumnFilter.vue | 52 +- components/lib/datatable/DataTable.d.ts | 448 +++++++++++++++++- components/lib/datatable/DataTable.vue | 39 +- components/lib/datatable/FooterCell.vue | 4 +- components/lib/datatable/HeaderCell.vue | 23 +- components/lib/datatable/HeaderCheckbox.vue | 21 +- components/lib/datatable/RowCheckbox.vue | 32 +- components/lib/datatable/RowRadioButton.vue | 21 +- components/lib/datatable/TableBody.vue | 34 +- components/lib/datatable/TableFooter.vue | 12 +- components/lib/datatable/TableHeader.vue | 17 +- components/lib/datatable/TableLoadingBody.vue | 25 - 15 files changed, 652 insertions(+), 113 deletions(-) delete mode 100755 components/lib/datatable/TableLoadingBody.vue diff --git a/api-generator/components/datatable.js b/api-generator/components/datatable.js index 8266bfb2d..0b875f983 100644 --- a/api-generator/components/datatable.js +++ b/api-generator/components/datatable.js @@ -377,6 +377,12 @@ const DataTableProps = [ type: 'string', default: 'null', description: 'Style class of the table element.' + }, + { + name: 'pt', + type: 'any', + default: 'null', + description: 'Uses to pass attributes to DOM elements inside the component.' } ]; diff --git a/components/lib/config/PrimeVue.d.ts b/components/lib/config/PrimeVue.d.ts index af86e280b..c6ffba8a7 100644 --- a/components/lib/config/PrimeVue.d.ts +++ b/components/lib/config/PrimeVue.d.ts @@ -19,6 +19,7 @@ import { ColorPickerPassThroughOptions } from '../colorpicker'; import { ConfirmDialogPassThroughOptions } from '../confirmdialog'; import { ConfirmPopupPassThroughOptions } from '../confirmpopup'; import { ContextMenuPassThroughOptions } from '../contextmenu'; +import { DataTablePassThroughOptions } from '../datatable'; import { DeferredContentPassThroughOptions } from '../deferredcontent'; import { DialogPassThroughOptions } from '../dialog'; import { DividerPassThroughOptions } from '../divider'; @@ -108,6 +109,7 @@ interface PrimeVuePTOptions { confirmdialog?: ConfirmDialogPassThroughOptions; confirmpopup?: ConfirmPopupPassThroughOptions; contextmenu?: ContextMenuPassThroughOptions; + datatable?: DataTablePassThroughOptions; deferredcontent?: DeferredContentPassThroughOptions; divider?: DividerPassThroughOptions; dialog?: DialogPassThroughOptions; diff --git a/components/lib/datatable/BodyCell.vue b/components/lib/datatable/BodyCell.vue index 3cfb83d1e..da1592e9c 100755 --- a/components/lib/datatable/BodyCell.vue +++ b/components/lib/datatable/BodyCell.vue @@ -1,9 +1,9 @@