From 9bfd3f2ab1c2256b8ec3428af7c55e3d50a61c7f Mon Sep 17 00:00:00 2001 From: Norbert Herczeg Date: Tue, 30 Apr 2024 17:17:25 +0200 Subject: [PATCH] JNG-5693 checkbox selection toggle --- .../hu/blackbelt/judo/ui/generator/react/UiTableHelper.java | 4 ++++ .../resources/actor/src/components/table/EagerTable.tsx.hbs | 4 +++- .../resources/actor/src/components/table/LazyTable.tsx.hbs | 4 +++- .../actor/src/containers/components/table/index.tsx.hbs | 6 ++++++ pom.xml | 2 +- 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/judo-ui-react/src/main/java/hu/blackbelt/judo/ui/generator/react/UiTableHelper.java b/judo-ui-react/src/main/java/hu/blackbelt/judo/ui/generator/react/UiTableHelper.java index c05ef820..bc4a5601 100644 --- a/judo-ui-react/src/main/java/hu/blackbelt/judo/ui/generator/react/UiTableHelper.java +++ b/judo-ui-react/src/main/java/hu/blackbelt/judo/ui/generator/react/UiTableHelper.java @@ -299,4 +299,8 @@ public static List customizableColumns(Table table) { .filter(VisualElement::isCustomImplementation) .toList(); } + + public static boolean checkboxSelectionEnabled(Table table) { + return table.getCheckboxSelection() == null || table.getCheckboxSelection() != CheckboxSelection.DISABLED; + } } diff --git a/judo-ui-react/src/main/resources/actor/src/components/table/EagerTable.tsx.hbs b/judo-ui-react/src/main/resources/actor/src/components/table/EagerTable.tsx.hbs index a49a93f8..7ed6e890 100644 --- a/judo-ui-react/src/main/resources/actor/src/components/table/EagerTable.tsx.hbs +++ b/judo-ui-react/src/main/resources/actor/src/components/table/EagerTable.tsx.hbs @@ -82,6 +82,7 @@ interface EagerTableProps string; ownerData?: any; + checkboxSelection?: boolean; isFormUpdateable?: () => boolean; enabledByName?: string; relationName: string; @@ -120,6 +121,7 @@ export function EagerTable boolean; enabledByName?: string; + checkboxSelection?: boolean; relationName: string; } @@ -139,6 +140,7 @@ export function LazyTable18.14.2 8.9.2 - 1.1.0.20240414_042431_d835a8fa_develop + 1.1.0.20240430_141047_55acda3e_develop 1.0.0.20231009_184136_321053b3_develop 1.0.0.20240308_130018_c6d4c7e2_feature_JNG_5598_command_masks