Fixes for editor crashes

This commit is contained in:
navaneeth 2021-05-07 13:11:32 +05:30
parent 4202f535d5
commit c9baa48c94
4 changed files with 15 additions and 8 deletions

View file

@ -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: [

View file

@ -217,7 +217,7 @@ class Table extends React.Component {
onChange={(name, value, color) => this.onActionButtonPropertyChanged(index, 'textColor', color)}
/>
<EventSelector
param="onClick"
param={{ name: 'onClick' }}
eventMeta={{ displayName: 'On click' }}
definition={action.onClick}
eventUpdated={this.actionButtonEventUpdated}

View file

@ -15,7 +15,7 @@ export const Color = ({
left: '0px'
};
const paramMeta = componentMeta[paramType][param.name];
const paramMeta = componentMeta[paramType][param.name] || {};
const displayName = paramMeta.displayName || param.name;
return (

View file

@ -134,8 +134,12 @@ export function onEvent(_ref, eventName, options) {
}
}
}, () => {
if (event.actionId) {
executeAction(_self, event);
if(event) {
if (event.actionId) {
executeAction(_self, event);
}
} else {
console.log('No action is associated with this event');
}
});
}