From c9baa48c947161570bdde6253508532921f863ed Mon Sep 17 00:00:00 2001 From: navaneeth Date: Fri, 7 May 2021 13:11:32 +0530 Subject: [PATCH] Fixes for editor crashes --- frontend/src/Editor/Components/components.js | 11 +++++++---- frontend/src/Editor/Inspector/Components/Table.jsx | 2 +- frontend/src/Editor/Inspector/Elements/Color.jsx | 2 +- frontend/src/_helpers/appUtils.js | 8 ++++++-- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/frontend/src/Editor/Components/components.js b/frontend/src/Editor/Components/components.js index 6bbabadd34..2520ac3191 100644 --- a/frontend/src/Editor/Components/components.js +++ b/frontend/src/Editor/Components/components.js @@ -11,7 +11,9 @@ export const componentTypes = [ visible: { type: 'string', displayName: 'Show when' }, loadingState: { type: 'string', displayName: 'Loading state' }, columns: { type: 'array', displayName: 'Table Columns' }, - serverSidePagination: { type: 'toggle', displayName: 'Server Side Pagination'} + serverSidePagination: { type: 'toggle', displayName: 'Server Side Pagination'}, + actionButtonBackgroundColor: { type: 'color', displayName: 'Background Color'}, + actionButtonTextColor: { type: 'color', displayName: 'Text Color'} }, defaultSize: { width: 810, @@ -28,7 +30,8 @@ export const componentTypes = [ exposedVariables: { selectedRow: {}, changeSet: {}, - dataUpdates: [] + dataUpdates: [], + pageIndex: 0 }, definition: { properties: { @@ -298,8 +301,8 @@ export const componentTypes = [ loadingState: { type: 'code', displayName: 'Show loading state' } }, defaultSize: { - width: 100, - height: 60 + width: 210, + height: 24 }, events: [ diff --git a/frontend/src/Editor/Inspector/Components/Table.jsx b/frontend/src/Editor/Inspector/Components/Table.jsx index 45dec29c2e..4efbea75d2 100644 --- a/frontend/src/Editor/Inspector/Components/Table.jsx +++ b/frontend/src/Editor/Inspector/Components/Table.jsx @@ -217,7 +217,7 @@ class Table extends React.Component { onChange={(name, value, color) => this.onActionButtonPropertyChanged(index, 'textColor', color)} /> { - if (event.actionId) { - executeAction(_self, event); + if(event) { + if (event.actionId) { + executeAction(_self, event); + } + } else { + console.log('No action is associated with this event'); } }); }