diff --git a/flow_screen_components/datatable/README.md b/flow_screen_components/datatable/README.md index c3c98d65d..88d20cabf 100644 --- a/flow_screen_components/datatable/README.md +++ b/flow_screen_components/datatable/README.md @@ -51,8 +51,8 @@ https://unofficialsf.com/flow-action-and-screen-component-basepacks/ --- **Install Datatable** -[Version 4.1.6 (Production or Developer)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5G000004XZk9QAG) -[Version 4.1.6 (Sandbox)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5G000004XZk9QAG) +[Version 4.2.0 (Production or Developer)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5G000004XZlHQAW) +[Version 4.2.0 (Sandbox)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5G000004XZlHQAW) --- **Starting with the Winter '21 Release, Salesforce requires that a User's Profile or Permission Set is given specific permission to access any @AuraEnabled Apex Method.** @@ -72,7 +72,25 @@ A Permission Set (**USF Flow Screen Component - Datatable**) is included with th --- # Release Notes -## 02/06/24 - Eric Smith - Version 4.1.6 +## 04/06/24 - Eric Smith - Version 4.2.0 +**Updates:** +- Added optional pagination +- Adds a selectable number of Records per Page input to the header - default value 10 +- Adds a navigation footer with a editable input showing the current page # and total number of pages +- The footer also includes Prev & Next buttons as well as optional First & Last Buttons +- The appropriate buttons are disabled if the user is on the first or the last page +- New pagination input prompts and button labels are translatable Custom Labels +- (Initial release does not support retaining selected records when sorting, filtering, searching, paginating) +- Made the Table Header Label reactive +- Moved the Configure Columns button from the top to the bottom of the Table Formatting section of the CPE + +**Bug Fixes:** +- Fixed bug where the maximum number of rows to be displayed gets cleared +- Fixed bug where an invalid link would show when an Apex Defined Lookup field was empty (@spyros-michailidisspyros-michailidis PR#1524) +- Fixed install issue with ers_DatatableController.cls if the target org has a class named "Test" +- Fixed a bug where Date fields from External Objects would show as blank (@philipnovak-pentair PR#1529) + +## 02/06/24 - Eric Smith - Version 4.1.6 **Bug Fixes:** - Fixed several Spring '24 "Cannot read properties of undefined..." errors - Allow a full row search when empty cells are present (thanks to clev32 PR#1478) diff --git a/flow_screen_components/datatable/force-app/main/default/classes/ers_DatatableController.cls b/flow_screen_components/datatable/force-app/main/default/classes/ers_DatatableController.cls index 074570e4b..e3ffe408b 100644 --- a/flow_screen_components/datatable/force-app/main/default/classes/ers_DatatableController.cls +++ b/flow_screen_components/datatable/force-app/main/default/classes/ers_DatatableController.cls @@ -47,6 +47,7 @@ * 3/14/22 Version 3.5.0 Added option to suppress the currency conversion introduced in v3.1.1 * 9/6/22 Version 4.0.9 Return a collection of datetime fields for handling in the LWC * 11/12/23 Version 4.1.5 Identify all datetime fields even if they are not in the Datatable (Needed to support reactive Collection Processors) + * 02/28/24 Version 4.2.0 Fix install issue if the target org has a class named "Test" */ @SuppressWarnings('PMD.ClassNamingConventions') @@ -389,7 +390,7 @@ public with sharing class ers_DatatableController { for (String currField : currencyFields) { currencyFieldsQuery += ', ' + - (Test.isRunningTest() ? currField : 'convertCurrency(' + currField + ')'); + (System.Test.isRunningTest() ? currField : 'convertCurrency(' + currField + ')'); } currencyFieldsQuery += ' FROM ' + objName + ' WHERE Id IN :records'; Map sobjCurrencyFields = new Map( diff --git a/flow_screen_components/datatable/force-app/main/default/classes/ers_DatatableController.cls-meta.xml b/flow_screen_components/datatable/force-app/main/default/classes/ers_DatatableController.cls-meta.xml index 754ecb155..f5e18fd16 100644 --- a/flow_screen_components/datatable/force-app/main/default/classes/ers_DatatableController.cls-meta.xml +++ b/flow_screen_components/datatable/force-app/main/default/classes/ers_DatatableController.cls-meta.xml @@ -1,5 +1,5 @@ - 57.0 + 60.0 Active diff --git a/flow_screen_components/datatable/force-app/main/default/classes/ers_DatatableControllerTest.cls-meta.xml b/flow_screen_components/datatable/force-app/main/default/classes/ers_DatatableControllerTest.cls-meta.xml index 754ecb155..f5e18fd16 100644 --- a/flow_screen_components/datatable/force-app/main/default/classes/ers_DatatableControllerTest.cls-meta.xml +++ b/flow_screen_components/datatable/force-app/main/default/classes/ers_DatatableControllerTest.cls-meta.xml @@ -1,5 +1,5 @@ - 57.0 + 60.0 Active diff --git a/flow_screen_components/datatable/force-app/main/default/classes/ers_EncodeDecodeURL.cls-meta.xml b/flow_screen_components/datatable/force-app/main/default/classes/ers_EncodeDecodeURL.cls-meta.xml index 754ecb155..f5e18fd16 100644 --- a/flow_screen_components/datatable/force-app/main/default/classes/ers_EncodeDecodeURL.cls-meta.xml +++ b/flow_screen_components/datatable/force-app/main/default/classes/ers_EncodeDecodeURL.cls-meta.xml @@ -1,5 +1,5 @@ - 57.0 + 60.0 Active diff --git a/flow_screen_components/datatable/force-app/main/default/classes/ers_EncodeDecodeURLTest.cls-meta.xml b/flow_screen_components/datatable/force-app/main/default/classes/ers_EncodeDecodeURLTest.cls-meta.xml index 754ecb155..f5e18fd16 100644 --- a/flow_screen_components/datatable/force-app/main/default/classes/ers_EncodeDecodeURLTest.cls-meta.xml +++ b/flow_screen_components/datatable/force-app/main/default/classes/ers_EncodeDecodeURLTest.cls-meta.xml @@ -1,5 +1,5 @@ - 57.0 + 60.0 Active diff --git a/flow_screen_components/datatable/force-app/main/default/classes/ers_QueryNRecords.cls-meta.xml b/flow_screen_components/datatable/force-app/main/default/classes/ers_QueryNRecords.cls-meta.xml index 754ecb155..f5e18fd16 100644 --- a/flow_screen_components/datatable/force-app/main/default/classes/ers_QueryNRecords.cls-meta.xml +++ b/flow_screen_components/datatable/force-app/main/default/classes/ers_QueryNRecords.cls-meta.xml @@ -1,5 +1,5 @@ - 57.0 + 60.0 Active diff --git a/flow_screen_components/datatable/force-app/main/default/classes/ers_QueryNRecordsTest.cls-meta.xml b/flow_screen_components/datatable/force-app/main/default/classes/ers_QueryNRecordsTest.cls-meta.xml index 754ecb155..f5e18fd16 100644 --- a/flow_screen_components/datatable/force-app/main/default/classes/ers_QueryNRecordsTest.cls-meta.xml +++ b/flow_screen_components/datatable/force-app/main/default/classes/ers_QueryNRecordsTest.cls-meta.xml @@ -1,5 +1,5 @@ - 57.0 + 60.0 Active diff --git a/flow_screen_components/datatable/force-app/main/default/labels/CustomLabels.labels-meta.xml b/flow_screen_components/datatable/force-app/main/default/labels/CustomLabels.labels-meta.xml index cfd46dd6c..ec44d73d2 100644 --- a/flow_screen_components/datatable/force-app/main/default/labels/CustomLabels.labels-meta.xml +++ b/flow_screen_components/datatable/force-app/main/default/labels/CustomLabels.labels-meta.xml @@ -32,6 +32,70 @@ Clear All Filters Clear All Filters + + ers_FirstButton + buttons + en_US + false + First Page + First + + + ers_PreviousButton + buttons + en_US + false + Previous Page + Prev + + + ers_NextButton + buttons + en_US + false + Next Page + Next + + + ers_LastButton + buttons + en_US + false + Last Page + Last + + + ers_RecordsPerPage + labels + en_US + false + Records per Page input label + Records per Page + + + ers_ShowingPagePrefix + labels + en_US + false + Showing Page x of y Pages input label prefix + Showing Page + + + ers_ShowingPageMiddle + labels + en_US + false + Showing Page x of y Pages input label middle + of + + + ers_ShowingPageSuffix + labels + en_US + false + Showing Page x of y Pages input label suffix + Pages + ers_SetFilterAction actions diff --git a/flow_screen_components/datatable/force-app/main/default/lwc/datatable/datatable.html b/flow_screen_components/datatable/force-app/main/default/lwc/datatable/datatable.html index 5792bfed1..926293ae2 100644 --- a/flow_screen_components/datatable/force-app/main/default/lwc/datatable/datatable.html +++ b/flow_screen_components/datatable/force-app/main/default/lwc/datatable/datatable.html @@ -109,8 +109,8 @@

Interact with this sample datatable to conf
- -