Skip to content

Commit

Permalink
fix: change props of SwitchField form element (#546)
Browse files Browse the repository at this point in the history
Co-authored-by: Hein Jeong <heinje@amazon.com>
  • Loading branch information
hein-j and Hein Jeong authored Jul 27, 2022
1 parent c5c6e65 commit ff3845d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ export function getFormDefinitionInputElement(
config.inputType?.defaultChecked,
baseConfig?.inputType?.defaultChecked,
]),
isRequired: getFirstDefinedValue([config.inputType?.required, baseConfig?.inputType?.required]),
isReadOnly: getFirstDefinedValue([config.inputType?.readOnly, baseConfig?.inputType?.readOnly]),
isDisabled: getFirstDefinedValue([config.inputType?.readOnly, baseConfig?.inputType?.readOnly]),
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export type FormDefinitionTextFieldElement = {

export type FormDefinitionSwitchFieldElement = {
componentType: 'SwitchField';
props: { label: string; defaultChecked?: boolean; isRequired?: boolean; isReadOnly?: boolean };
props: { label: string; defaultChecked?: boolean; isDisabled?: boolean };
};

export type FormDefinitionPhoneNumberFieldElement = {
Expand Down

0 comments on commit ff3845d

Please sign in to comment.