From a56aa9c954c1cd96ac5f0de1f645d64b90f2f5f3 Mon Sep 17 00:00:00 2001 From: Sherfin Shamsudeen Date: Mon, 13 Sep 2021 15:37:07 +0530 Subject: [PATCH] Add property to show or hide bulk update actions on Table (#739) --- frontend/src/Editor/Components/Table/Table.jsx | 5 ++++- frontend/src/Editor/Components/components.js | 2 ++ frontend/src/Editor/Inspector/Components/Table.jsx | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/Editor/Components/Table/Table.jsx b/frontend/src/Editor/Components/Table/Table.jsx index c25adeffde..0ff84693ee 100644 --- a/frontend/src/Editor/Components/Table/Table.jsx +++ b/frontend/src/Editor/Components/Table/Table.jsx @@ -53,6 +53,9 @@ export function Table({ const showFilterButtonProperty = component.definition.properties.showFilterButton?.value; const showFilterButton = resolveWidgetFieldValue(showFilterButtonProperty, currentState) ?? true; // default is true for backward compatibility + const showBulkUpdateActionsProperty = component.definition.properties.showBulkUpdateActions?.value; + const showBulkUpdateActions = resolveWidgetFieldValue(showBulkUpdateActionsProperty, currentState) ?? true; // default is true for backward compatibility + const clientSidePaginationProperty = component.definition.properties.clientSidePagination?.value; const clientSidePagination = resolveWidgetFieldValue(clientSidePaginationProperty, currentState) ?? !serverSidePagination; // default is true for backward compatibility @@ -785,7 +788,7 @@ export function Table({ } - {Object.keys(componentState.changeSet || {}).length > 0 && ( + {(showBulkUpdateActions && Object.keys(componentState.changeSet || {}).length > 0) && (