From 97d112a2e04faab7bf1acd60bda09bf1c709ca57 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: Wed, 19 Jul 2023 15:05:06 +0300 Subject: [PATCH] Refactor #4149 - For DataTable & Column & ColumnGroup --- components/lib/column/Column.d.ts | 33 +++++++++++++ components/lib/columngroup/ColumnGroup.d.ts | 5 ++ components/lib/datatable/BodyCell.vue | 8 ++-- components/lib/datatable/ColumnFilter.vue | 51 +++++++++++++++++---- components/lib/datatable/DataTable.d.ts | 30 ++++++++++++ components/lib/datatable/FooterCell.vue | 4 +- components/lib/datatable/HeaderCell.vue | 8 +++- components/lib/datatable/HeaderCheckbox.vue | 7 ++- components/lib/datatable/RowCheckbox.vue | 7 ++- components/lib/datatable/RowRadioButton.vue | 7 ++- components/lib/datatable/TableBody.vue | 46 +++++++++++++------ components/lib/datatable/TableFooter.vue | 12 ++++- components/lib/datatable/TableHeader.vue | 14 +++++- 13 files changed, 195 insertions(+), 37 deletions(-) diff --git a/components/lib/column/Column.d.ts b/components/lib/column/Column.d.ts index b96c57476..d4f2ad3a7 100755 --- a/components/lib/column/Column.d.ts +++ b/components/lib/column/Column.d.ts @@ -141,6 +141,10 @@ export interface ColumnPassThroughOptions { * Uses to pass attributes to the filter menu button's DOM element. */ filterMenuButton?: ColumnPassThroughOptionType; + /** + * Uses to pass attributes to the filter menu icon's DOM element. + */ + filterMenuIcon?: ColumnPassThroughOptionType; /** * Uses to pass attributes to the header filter clear button's DOM element. */ @@ -609,6 +613,35 @@ export interface ColumnContext { * @defaultValue false */ resizable: boolean; + /** + * Current size state of the table. + */ + size: string; + /** + * Current gridlines state of the table as a boolean. + * @defaultValue false + */ + showGridlines: boolean; + /** + * Current highlighted state of the filter row item as a boolean. + * @defaultValue false + */ + highlighted: boolean; + /** + * Current hidden state of the filter clear button of a column as a boolean. + * @defaultValue false + */ + hidden: boolean; + /** + * Current visible state of the filter menu of a column as a boolean. + * @defaultValue false + */ + overlayVisible: boolean; + /** + * Current active state of the filter menu of a column as a boolean. + * @defaultValue false + */ + active: boolean; } /** diff --git a/components/lib/columngroup/ColumnGroup.d.ts b/components/lib/columngroup/ColumnGroup.d.ts index be194f927..0b86795e1 100755 --- a/components/lib/columngroup/ColumnGroup.d.ts +++ b/components/lib/columngroup/ColumnGroup.d.ts @@ -72,6 +72,11 @@ export interface ColumnGroupContext { * Current type of the column group. */ type: string; + /** + * Current scrollable state of column group as a boolean. + * @defaultValue false + */ + scrollable: boolean; } /** diff --git a/components/lib/datatable/BodyCell.vue b/components/lib/datatable/BodyCell.vue index 61617b452..342c013d4 100755 --- a/components/lib/datatable/BodyCell.vue +++ b/components/lib/datatable/BodyCell.vue @@ -46,8 +46,8 @@