From a13fe4369e66bba6659d1e5cef65eb4847886ce6 Mon Sep 17 00:00:00 2001 From: Nikhil Nandagopal Date: Wed, 21 Apr 2021 16:10:45 +0530 Subject: [PATCH] updated the default table data to guide users to connect a datasource --- .../mockResponses/WidgetConfigResponse.tsx | 40 +++++++++++-------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/app/client/src/mockResponses/WidgetConfigResponse.tsx b/app/client/src/mockResponses/WidgetConfigResponse.tsx index 03cf9ab4b5..f9e50de0a9 100644 --- a/app/client/src/mockResponses/WidgetConfigResponse.tsx +++ b/app/client/src/mockResponses/WidgetConfigResponse.tsx @@ -138,28 +138,36 @@ const WidgetConfigResponse: WidgetConfigReducerState = { horizontalAlignment: "LEFT", verticalAlignment: "CENTER", primaryColumns: {}, - derivedColumns: {}, + derivedColumns: { + action: { + id: "1", + label: "Action", + columnType: "button", + isVisible: true, + isDerived: true, + index: 3, + buttonLabel: "Start", + width: 50, + computedValue: "Do It", + onClick: + "{{currentRow.step === '#1' ? showAlert('Done', 'success') : currentRow.step === '#2' ? navigateTo('https://docs.appsmith.com/core-concepts/connecting-to-data-sources/connecting-to-databases/querying-a-database',undefined,'NEW_WINDOW') : navigateTo('https://docs.appsmith.com/core-concepts/displaying-data-read/display-data-tables',undefined,'NEW_WINDOW')}}", + }, + }, tableData: [ { - id: 2381224, - email: "michael.lawson@reqres.in", - userName: "Michael Lawson", - productName: "Chicken Sandwich", - orderAmount: 4.99, + step: "#1", + task: "Drag a Table", + status: "✅", }, { - id: 2736212, - email: "lindsay.ferguson@reqres.in", - userName: "Lindsay Ferguson", - productName: "Tuna Salad", - orderAmount: 9.99, + step: "#2", + task: "Create a Query fetch_users with the Mock DB", + status: "--", }, { - id: 6788734, - email: "tobias.funke@reqres.in", - userName: "Tobias Funke", - productName: "Beef steak", - orderAmount: 19.99, + step: "#3", + task: "Bind the query to the table {{fetch_users.data}}", + status: "--", }, ], version: 1,