From 1e1e4810c889afd45a12cfbaaebe4e185576d23f Mon Sep 17 00:00:00 2001 From: FalkWolsky Date: Tue, 27 Aug 2024 21:56:12 +0200 Subject: [PATCH 1/4] Adapting Table Properties Display --- .../comps/tableComp/tablePropertyView.tsx | 38 ++++++++++--------- .../packages/lowcoder/src/i18n/locales/en.ts | 8 ++-- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/tablePropertyView.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/tablePropertyView.tsx index fff48e6fe..f51b9fe1f 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/tablePropertyView.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/tablePropertyView.tsx @@ -489,21 +489,40 @@ export function compTablePropertyView <>
{comp.children.onEvent.getPropertyView()} - {comp.children.selection.getPropertyView()} {hiddenPropertyView(comp.children)} {loadingPropertyView(comp.children)} + {comp.children.showDataLoadSpinner.propertyView({ + label: trans("table.showDataLoadSpinner"), + })} + {comp.children.selection.getPropertyView()} + {comp.children.editModeClicks.propertyView({ + label: trans("table.editMode"), + radioButton: true, + })} + {comp.children.searchText.propertyView({ + label: trans("table.searchText"), + tooltip: trans("table.searchTextTooltip"), + placeholder: "{{input1.value}}", + })}
{comp.children.showSummary.propertyView({ label: trans("table.showSummary") })} - {comp.children.summaryRows.propertyView({ + {comp.children.showSummary.getView() && + comp.children.summaryRows.propertyView({ label: trans("table.totalSummaryRows"), radioButton: true, })}
+
+ {comp.children.inlineAddNewRow.propertyView({ + label: trans("table.inlineAddNewRow") + })} +
+
{comp.children.toolbar.getPropertyView()}
@@ -550,27 +569,12 @@ export function compTablePropertyView <>
{comp.children.expansion.getPropertyView()} - {comp.children.inlineAddNewRow.propertyView({ - label: trans("table.inlineAddNewRow") - })} - {comp.children.showDataLoadSpinner.propertyView({ - label: trans("table.showDataLoadSpinner"), - })} {comp.children.dynamicColumn.propertyView({ label: trans("table.dynamicColumn") })} {comp.children.dynamicColumn.getView() && comp.children.dynamicColumnConfig.propertyView({ label: trans("table.dynamicColumnConfig"), tooltip: trans("table.dynamicColumnConfigDesc"), })} - {comp.children.editModeClicks.propertyView({ - label: trans("table.editMode"), - radioButton: true, - })} - {comp.children.searchText.propertyView({ - label: trans("table.searchText"), - tooltip: trans("table.searchTextTooltip"), - placeholder: "{{input1.value}}", - })}
)} diff --git a/client/packages/lowcoder/src/i18n/locales/en.ts b/client/packages/lowcoder/src/i18n/locales/en.ts index 7a2f2df4c..42b0271f4 100644 --- a/client/packages/lowcoder/src/i18n/locales/en.ts +++ b/client/packages/lowcoder/src/i18n/locales/en.ts @@ -1854,7 +1854,7 @@ export const en = { "columnSeparatorTooltip": "Column Separator (\"delimiter\") in downloaded CSV file. \n\nRecommendations:\n- Comma (,)\n- Semicolon (;)\n- Pipe (|)\n- Tab (\\t)", "columnSetting": "Show Columns Visibility Button", "searchText": "Search Text", - "searchTextTooltip": "Search and Filter the Data Presented in the Table", + "searchTextTooltip": "Search and Filter the Data, which is currently Presented in the Table. This is a frontend-only Search and Does Not Affect the Data Source Query.)", "showQuickJumper": "Show Quick Jumper", "hideOnSinglePage": "Hide on Single Page", "showSizeChanger": "Show Size Changer Button", @@ -1999,9 +1999,9 @@ export const en = { "allColumn": "All", "visibleColumn": "Visible", "emptyColumns": "No Columns Are Currently Visible", - "showSummary": "Show Summary Row", + "showSummary": "Show Summary Row(s)", "totalSummaryRows": "Total Rows", - "inlineAddNewRow": "Inline Add New Row", + "inlineAddNewRow": "Inline Add New Row(s)", "editMode": "Edit Mode", "singleClick": "Single Click", "doubleClick": "Double Click", @@ -2142,7 +2142,7 @@ export const en = { "single": "Single", "multiple": "Multiple", "close": "Close", - "mode": "Select Mode" + "mode": "Row Select Mode" }, "container": { "title": "Displayed Container Title", From 4ee38ebf5009a7d1b906d236bfdc90b586e99eae Mon Sep 17 00:00:00 2001 From: RAHEEL Date: Wed, 28 Aug 2024 14:55:25 +0500 Subject: [PATCH 2/4] option to show/hide submit/cancel buttons in table toolbar --- .../lowcoder/src/comps/comps/tableComp/tableToolbarComp.tsx | 4 +++- client/packages/lowcoder/src/i18n/locales/en.ts | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/client/packages/lowcoder/src/comps/comps/tableComp/tableToolbarComp.tsx b/client/packages/lowcoder/src/comps/comps/tableComp/tableToolbarComp.tsx index a6e05f927..67b96cfe9 100644 --- a/client/packages/lowcoder/src/comps/comps/tableComp/tableToolbarComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/tableComp/tableToolbarComp.tsx @@ -562,6 +562,7 @@ export const TableToolbarComp = (function () { filter: stateComp({ stackType: "and", filters: [] }), position: dropdownControl(positionOptions, "below"), columnSeparator: withDefault(StringControl, ','), + showUpdateButtons: withDefault(BoolControl, true), }; return new ControlNodeCompBuilder(childrenMap, (props, dispatch) => { @@ -587,6 +588,7 @@ export const TableToolbarComp = (function () { label: trans("table.fixedToolbar"), tooltip: trans("table.fixedToolbarTooltip") }), + children.showUpdateButtons.propertyView({ label: trans("table.showUpdateButtons")}), children.showFilter.propertyView({ label: trans("table.showFilter") }), children.showRefresh.propertyView({ label: trans("table.showRefresh") }), children.showDownload.propertyView({ label: trans("table.showDownload") }), @@ -816,7 +818,7 @@ export function TableToolbar(props: { } }} /> - {hasChange && ( + {hasChange && toolbar.showUpdateButtons && (