Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
fix: restore boolean property inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
marionebl committed May 24, 2018
1 parent e6bc266 commit e2553b0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/container/property-list/property-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ interface PropertyViewContainerProps {
@MobxReact.observer
class PropertyViewContainer extends React.Component<PropertyViewContainerProps> {
private handleCheckboxChange(e: React.ChangeEvent<HTMLElement>): void {
console.log(e);
const target = e.target as HTMLInputElement;
this.props.property.setValue(target.checked);
}

private handleInputChange(e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>): void {
Expand Down Expand Up @@ -68,10 +69,11 @@ class PropertyViewContainer extends React.Component<PropertyViewContainerProps>
);
}
case P.Boolean: {
const value = property.getValue() as boolean;
return (
<Component.BooleanItem
{...base}
checked={false}
checked={value}
onChange={e => this.handleCheckboxChange(e)}
/>
);
Expand Down

0 comments on commit e2553b0

Please sign in to comment.