You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
645 B
25 lines
645 B
import React from "react";
|
|
|
|
export default class CheckField extends React.Component {
|
|
check = this.props.checking;
|
|
chengeStatus(id) {
|
|
//this.check = !this.props.checking;
|
|
document.getElementById(id).checked = !this.check;
|
|
return !this.check;
|
|
}
|
|
render() {
|
|
return (
|
|
<p onClick={() => this.chengeStatus(this.props.id)}>
|
|
<span> {this.props.text}</span>
|
|
<input
|
|
id={this.props.id}
|
|
style={{ float: "right" }}
|
|
type="checkbox"
|
|
checked={this.check}
|
|
//onClick={() => this.chengeStatus(this.props.id)}
|
|
/>
|
|
</p>
|
|
);
|
|
}
|
|
}
|