From 711e5fbccd7f89574735c0a0bf4e4f2cbd6b1d17 Mon Sep 17 00:00:00 2001 From: Austin Walker Date: Tue, 9 Apr 2024 12:19:53 -0600 Subject: [PATCH 1/4] fix(table): removed invalid transforms on Inputs --- src/app/components/table/table.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/table/table.ts b/src/app/components/table/table.ts index 1e426e5fb25..9f88cc20dda 100644 --- a/src/app/components/table/table.ts +++ b/src/app/components/table/table.ts @@ -539,12 +539,12 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable * Map instance to keep the expanded rows where key of the map is the data key of the row. * @group Props */ - @Input({ transform: booleanAttribute }) expandedRowKeys: { [s: string]: boolean } = {}; + @Input() expandedRowKeys: { [s: string]: boolean } = {}; /** * Map instance to keep the rows being edited where key of the map is the data key of the row. * @group Props */ - @Input({ transform: booleanAttribute }) editingRowKeys: { [s: string]: boolean } = {}; + @Input() editingRowKeys: { [s: string]: boolean } = {}; /** * Whether multiple rows can be expanded at any time. Valid values are "multiple" and "single". * @group Props From 5dfddd9f0a9120c4026c6b640ec375301dcba292 Mon Sep 17 00:00:00 2001 From: Austin Walker Date: Wed, 10 Apr 2024 08:44:20 -0600 Subject: [PATCH 2/4] fix(dataview orderlist picklist table tree treetable): removed invalid transforms on Inputs --- src/app/components/dataview/dataview.ts | 2 +- src/app/components/orderlist/orderlist.ts | 2 +- src/app/components/picklist/picklist.ts | 2 +- src/app/components/slidemenu/slidemenu.ts | 4 ++-- src/app/components/table/table.ts | 2 +- src/app/components/tree/tree.ts | 2 +- src/app/components/treetable/treetable.ts | 2 +- src/app/showcase/doc/apidoc/index.json | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/app/components/dataview/dataview.ts b/src/app/components/dataview/dataview.ts index 09564a67ee2..b611e36bd09 100755 --- a/src/app/components/dataview/dataview.ts +++ b/src/app/components/dataview/dataview.ts @@ -232,7 +232,7 @@ export class DataView implements OnInit, AfterContentInit, OnDestroy, BlockableU * Function to optimize the dom operations by delegating to ngForTrackBy, default algorithm checks for object identity. * @group Props */ - @Input({ transform: numberAttribute }) trackBy: Function = (index: number, item: any) => item; + @Input() trackBy: Function = (index: number, item: any) => item; /** * Comma separated list of fields in the object graph to search against. * @group Props diff --git a/src/app/components/orderlist/orderlist.ts b/src/app/components/orderlist/orderlist.ts index 6679cc6e26f..c2ce2a9ee7c 100755 --- a/src/app/components/orderlist/orderlist.ts +++ b/src/app/components/orderlist/orderlist.ts @@ -271,7 +271,7 @@ export class OrderList implements AfterViewChecked, AfterContentInit { * Function to optimize the dom operations by delegating to ngForTrackBy, default algorithm checks for object identity. * @group Props */ - @Input({ transform: numberAttribute }) trackBy: Function = (index: number, item: any) => item; + @Input() trackBy: Function = (index: number, item: any) => item; /** * A list of values that are currently selected. diff --git a/src/app/components/picklist/picklist.ts b/src/app/components/picklist/picklist.ts index f64a891d5a9..bfc2ee6cc76 100755 --- a/src/app/components/picklist/picklist.ts +++ b/src/app/components/picklist/picklist.ts @@ -450,7 +450,7 @@ export class PickList implements AfterViewChecked, AfterContentInit { * Function to optimize the dom operations by delegating to ngForTrackBy, default algorithm checks for object identity. Use sourceTrackBy or targetTrackBy in case different algorithms are needed per list. * @group Props */ - @Input({ transform: numberAttribute }) trackBy: Function = (index: number, item: any) => item; + @Input() trackBy: Function = (index: number, item: any) => item; /** * Function to optimize the dom operations by delegating to ngForTrackBy in source list, default algorithm checks for object identity. * @group Props diff --git a/src/app/components/slidemenu/slidemenu.ts b/src/app/components/slidemenu/slidemenu.ts index bb8af66a637..acc68f54c66 100755 --- a/src/app/components/slidemenu/slidemenu.ts +++ b/src/app/components/slidemenu/slidemenu.ts @@ -202,7 +202,7 @@ export class SlideMenuSub { @Input() easing: string = 'ease-out'; - @Input() effectDuration: any; + @Input({ transform: numberAttribute }) effectDuration: number; @Input({ transform: booleanAttribute }) autoDisplay: boolean | undefined; @@ -406,7 +406,7 @@ export class SlideMenu implements OnInit, AfterContentInit, OnDestroy { * Duration of the sliding animation in milliseconds. * @group Props */ - @Input({ transform: numberAttribute }) effectDuration: any = 250; + @Input({ transform: numberAttribute }) effectDuration: number = 250; /** * Easing animation to use for sliding. * @group Props diff --git a/src/app/components/table/table.ts b/src/app/components/table/table.ts index 9f88cc20dda..1cb08eb3f4a 100644 --- a/src/app/components/table/table.ts +++ b/src/app/components/table/table.ts @@ -489,7 +489,7 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable * Function to optimize the dom operations by delegating to ngForTrackBy, default algorithm checks for object identity. * @group Props */ - @Input({ transform: numberAttribute }) rowTrackBy: Function = (index: number, item: any) => item; + @Input() rowTrackBy: Function = (index: number, item: any) => item; /** * Defines if data is loaded and interacted with in lazy manner. * @group Props diff --git a/src/app/components/tree/tree.ts b/src/app/components/tree/tree.ts index abb2b5adad9..8a69c548c94 100755 --- a/src/app/components/tree/tree.ts +++ b/src/app/components/tree/tree.ts @@ -1010,7 +1010,7 @@ export class Tree implements OnInit, AfterContentInit, OnChanges, OnDestroy, Blo * Function to optimize the node list rendering, default algorithm checks for object identity. * @group Props */ - @Input({ transform: numberAttribute }) trackBy: Function = (index: number, item: any) => item; + @Input() trackBy: Function = (index: number, item: any) => item; /** * Height of the node. * @group Props diff --git a/src/app/components/treetable/treetable.ts b/src/app/components/treetable/treetable.ts index d3cfb1ddd03..1afebdbba5a 100755 --- a/src/app/components/treetable/treetable.ts +++ b/src/app/components/treetable/treetable.ts @@ -502,7 +502,7 @@ export class TreeTable implements AfterContentInit, OnInit, OnDestroy, Blockable * Function to optimize the dom operations by delegating to ngForTrackBy, default algorithm checks for object identity. * @group Props */ - @Input({ transform: numberAttribute }) rowTrackBy: Function = (index: number, item: any) => item; + @Input() rowTrackBy: Function = (index: number, item: any) => item; /** * An array of FilterMetadata objects to provide external filters. * @group Props diff --git a/src/app/showcase/doc/apidoc/index.json b/src/app/showcase/doc/apidoc/index.json index c87e1474577..9b31b3ce41a 100644 --- a/src/app/showcase/doc/apidoc/index.json +++ b/src/app/showcase/doc/apidoc/index.json @@ -20810,7 +20810,7 @@ "name": "effectDuration", "optional": false, "readonly": false, - "type": "any", + "type": "number", "default": "250", "description": "Duration of the sliding animation in milliseconds." }, From 7c14df7f8e8198c632fcd01128add09433426a51 Mon Sep 17 00:00:00 2001 From: Austin Walker Date: Thu, 11 Apr 2024 14:37:21 -0600 Subject: [PATCH 3/4] fix(#15259): Remove transform on rowSelectable --- src/app/components/table/table.ts | 3 ++- src/app/showcase/doc/apidoc/index.json | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/components/table/table.ts b/src/app/components/table/table.ts index 1cb08eb3f4a..1dc143c473e 100644 --- a/src/app/components/table/table.ts +++ b/src/app/components/table/table.ts @@ -484,7 +484,7 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable * Defines if the row is selectable. * @group Props */ - @Input({ transform: booleanAttribute }) rowSelectable: boolean | undefined | any; + @Input() rowSelectable: (row: { data: any; index: number }) => boolean | undefined; /** * Function to optimize the dom operations by delegating to ngForTrackBy, default algorithm checks for object identity. * @group Props @@ -1944,6 +1944,7 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable } isRowSelectable(data: any, index: number) { + console.log(data, index); if (this.rowSelectable && !this.rowSelectable({ data, index })) { return false; } diff --git a/src/app/showcase/doc/apidoc/index.json b/src/app/showcase/doc/apidoc/index.json index 9b31b3ce41a..3c9bd23b91b 100644 --- a/src/app/showcase/doc/apidoc/index.json +++ b/src/app/showcase/doc/apidoc/index.json @@ -22643,7 +22643,7 @@ "name": "rowSelectable", "optional": false, "readonly": false, - "type": "any", + "type": "(row: { data: any; index: number }) => boolean", "description": "Defines if the row is selectable." }, { @@ -28773,4 +28773,4 @@ } } } -} \ No newline at end of file +} From 3889817b249d8e32dccb2b61f3e8020aacef9538 Mon Sep 17 00:00:00 2001 From: Austin Walker Date: Fri, 12 Apr 2024 18:24:49 -0600 Subject: [PATCH 4/4] fix #15264 - Removed transform on minFractionDigits/minFractionDigits --- src/app/components/inputnumber/inputnumber.ts | 4 ++-- src/app/components/table/table.ts | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/app/components/inputnumber/inputnumber.ts b/src/app/components/inputnumber/inputnumber.ts index 158d5dc9b18..eb5eab55fd2 100644 --- a/src/app/components/inputnumber/inputnumber.ts +++ b/src/app/components/inputnumber/inputnumber.ts @@ -371,12 +371,12 @@ export class InputNumber implements OnInit, AfterContentInit, OnChanges, Control * The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the ISO 4217 currency code list (2 if the list doesn't provide that information). * @group Props */ - @Input({ transform: numberAttribute }) minFractionDigits: number | undefined; + @Input() minFractionDigits: number | undefined; /** * The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the ISO 4217 currency code list (2 if the list doesn't provide that information). * @group Props */ - @Input({ transform: numberAttribute }) maxFractionDigits: number | undefined; + @Input() maxFractionDigits: number | undefined; /** * Text to display before the value. * @group Props diff --git a/src/app/components/table/table.ts b/src/app/components/table/table.ts index 1dc143c473e..dc152cd37c5 100644 --- a/src/app/components/table/table.ts +++ b/src/app/components/table/table.ts @@ -1944,7 +1944,6 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable } isRowSelectable(data: any, index: number) { - console.log(data, index); if (this.rowSelectable && !this.rowSelectable({ data, index })) { return false; } @@ -5170,12 +5169,12 @@ export class ColumnFilter implements AfterContentInit { * Defines minimum fraction of digits. * @group Props */ - @Input({ transform: numberAttribute }) minFractionDigits: number | undefined; + @Input() minFractionDigits: number | undefined; /** * Defines maximum fraction of digits. * @group Props */ - @Input({ transform: numberAttribute }) maxFractionDigits: number | undefined; + @Input() maxFractionDigits: number | undefined; /** * Defines prefix of the filter. * @group Props @@ -5808,9 +5807,9 @@ export class ColumnFilterFormElement implements OnInit { @Input() placeholder: string | undefined; - @Input({ transform: numberAttribute }) minFractionDigits: number | undefined; + @Input() minFractionDigits: number | undefined; - @Input({ transform: numberAttribute }) maxFractionDigits: number | undefined; + @Input() maxFractionDigits: number | undefined; @Input() prefix: string | undefined;