Skip to content

Commit

Permalink
ADDON-34289: Updated CheckBox and Text components
Browse files Browse the repository at this point in the history
  • Loading branch information
dkhatri-crest committed Mar 8, 2021
1 parent 057b670 commit 9cb3558
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ class CheckBoxComponent extends Component {
super(props);
}

handleChange = (e, {value}) => {
this.props.handleChange(this.props.id, value);
handleChange = (e) => {
this.props.handleChange(this.props.id, 1 - this.props.value);
};

render() {
return (
<Switch
key={this.props.field}
value={this.props.value}
value={this.props.field}
onClick={this.handleChange}
selected={this.props.value === 1 ? true : false}
disabled={this.props.disabled}
selected={this.props.value ? true : false}
appearance="checkbox"
>
</Switch>
></Switch>
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TextComponent extends Component {
disabled={this.props.disabled}
value={this.props.value}
onChange={this.handleChange}
type={this.props.encrypted === true ? 'password' : 'text'}
type={this.props.encrypted ? 'password' : 'text'}
/>
);
}
Expand Down

0 comments on commit 9cb3558

Please sign in to comment.