Skip to content

Commit

Permalink
Removing Ids and adding bind and trigger properties as per new config.
Browse files Browse the repository at this point in the history
  • Loading branch information
marks0351 committed Feb 16, 2021
1 parent 59a675b commit ec6026a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/client/src/widgets/CheckboxWidget.tsx
Expand Up @@ -46,7 +46,7 @@ class CheckboxWidget extends BaseWidget<CheckboxWidgetProps, WidgetState> {
value: "RIGHT",
},
],
isBindProperty: false,
isBindProperty: true,
isTriggerProperty: false,
},
{
Expand Down
20 changes: 12 additions & 8 deletions app/client/src/widgets/SwitchWidget.tsx
Expand Up @@ -19,23 +19,24 @@ class SwitchWidget extends BaseWidget<SwitchWidgetProps, WidgetState> {
static getPropertyPaneConfig() {
return [
{
id: "19.1",
sectionName: "General",
children: [
{
id: "19.1.1",
propertyName: "label",
label: "Label",
controlType: "INPUT_TEXT",
helpText: "Displays a label next to the widget",
placeholderText: "Enter label text",
isBindProperty: true,
isTriggerProperty: false,
},
{
id: "19.1.2",
propertyName: "alignWidget",
helpText: "Sets the alignment of the widget",
label: "Alignment",
controlType: "DROP_DOWN",
isBindProperty: true,
isTriggerProperty: false,
options: [
{
label: "Left",
Expand All @@ -48,43 +49,46 @@ class SwitchWidget extends BaseWidget<SwitchWidgetProps, WidgetState> {
],
},
{
id: "19.1.3",
propertyName: "defaultSwitchState",
label: "Default Selected",
helpText:
"On / Off the Switch by default. Changes to the default selection update the widget state",
controlType: "SWITCH",
isJSConvertible: true,
isBindProperty: false,
isTriggerProperty: false,
},
{
id: "19.1.4",
propertyName: "isVisible",
label: "Visible",
helpText: "Controls the visibility of the widget",
controlType: "SWITCH",
isJSConvertible: true,
isBindProperty: true,
isTriggerProperty: false,
},
{
id: "19.1.5",
propertyName: "isDisabled",
label: "Disabled",
controlType: "SWITCH",
helpText: "Disables input to this widget",
isJSConvertible: true,
isBindProperty: true,
isTriggerProperty: false,
},
],
},
{
id: "19.2",
sectionName: "Actions",
children: [
{
id: "19.2.1",
helpText: "Triggers an action when the switch state is changed",
propertyName: "onChange",
label: "onChange",
controlType: "ACTION_SELECTOR",
isJSConvertible: true,
isBindProperty: true,
isTriggerProperty: true,
},
],
},
Expand Down

0 comments on commit ec6026a

Please sign in to comment.